What is the origin of 'as long as' meaning 'on condition that'?
The two senses you mention are adverbial. In sense 1,
as long as you live,
as long as expresses an 'amount of relative duration'. In sense 2,
as long as I can arrive on time,
as long as expresses 'on the condition that', 'provided that', or 'if only'.
These senses are summed up by definition 1b of long, adv.1 in OED Online:
In the comparative and superlative, or preceded by advs. of comparison (as, how, so, thus, too, etc.), the adv. indicates amount of relative duration. (Cf. long adj.1 8a.) so (or as) long as: often nearly equivalent to ‘provided that’, ‘if only’. Also, long as, ellipt. for so (or as) long as.
c900 tr. Bede Eccl. Hist. iv.xxv. (Schipper) 496 Ic..þe..ætywde..hu lange þu on hreowe awunian sceole.
971 Blickl. Hom. 169 Swa lange swa ge ðisdydon ðara anum ðe on me gelyfdon.
["long, adv.1". OED Online. December 2015. Oxford University Press. http://www.oed.com/view/Entry/109979?redirectedFrom=as+long+as (accessed February 18, 2016). Bold emphasis mine.]
In the first quote shown, from Bede's Ecclesiastical History, which dates to sometime before 950, "hu lange" translates as 'how long' (Latin quamdiu, see the fourth bullet at the Bosworth-Toller Anglo-Saxon Dictionary entry for 'hreów': quamdiu pœnitentiæ insistere, which may be translated as "how long [a time] to continue your penance"--translation from Saint Bede, The Complete Works of Venerable Bede, in the original Latin, collated with the Manuscripts, and various printed editions, and accompanied by a new English translation of the Historical Works, and a Life of the Author).
In the second quote shown, from Blickling Homilies, which dates to 971, "Swa lange swa" translates literally to 'as long as', used in your second sense, that is, it means 'provided that' or, more precisely in this case, 'on account of the fact that':
...as long as you did this to only one who believed in me...
(From Blickling Homilies: Edition and Translation, Richard J. Kelly, Bloomsbury Publishing, Jul 15, 2010, p. 119.)
Image from the untranslated page:
(From The Blickling Homilies of the Tenth Century from the Marquis of Lothian's Unique Ms. A.D. 971, Volume 1, Richard Morris, Early English text society, 1880, p. 169. See p. 168 for the translation.)
Thus,
- The OED lexicographers did not consider the adverbial senses of 'as long as' indicating "amount of relative duration" and "nearly equivalent to 'provided that', 'if only'" sufficiently distinct to warrant separate definitions or separate lists of supporting attestations.
- Attestation from approximately the same period illustrates both adverbial senses.
Additionally, the etymology given for these adverbial senses of 'long' (adv.1, definition 1b) suggests a derivation from adjectival uses of 'long' (adj.1). The earliest attestations provided for the adverbial senses and the adjectival senses are, however, from the same work, dated to around 888 (Ælfred tr. Boethius, De Consol. Philosophy).
The cross-reference in the OED adverb definition 1b to definition 8a of the adjective for "amount of relative duration", but not for 'provided that', does suggest the lexicographers see a closer relationship between that sense of 'amount of relative duration' and the sense of the etymological source adjective.
The cross-referenced adjectival sense of 'long' is this:
Having (more or less, or a specified) extension serially or temporally.
["long, adj.1 and n.". OED Online. December 2015. Oxford University Press. http://www.oed.com/view/Entry/109975 (accessed February 18, 2016).]
The evidence presented, however, does not support a conclusion that one of the adverbial senses was the source or "original" form of the other adverbial sense.
It is clear that the adverbial sense of 'long' in the phrase 'as long as', meaning 'amount of relative duration' refers to temporal extension. That is not clear in the case of the adverbial sense "nearly equivalent to 'provided that'". For 'provided that' and similar meanings, I prefer logical and thus serial extension to temporal extension. In this context, serial refers to "...forming part of...a series, in respect...of conceptual order" (OED Online, serial, adj. and n., emphasis mine).
Thus, while the base meaning of 'long' may be the same in both cases, that is, it conveys the idea of extension, in the first case, (your sense 1) 'long' refers to a temporal extension, and in the second case (your sense 2) 'long' refers to a serial extension.
In a word, yes. Long is an adjective used to describe the length of something (duh). In both those examples, it references (in weird ways) the length of time, specifically the length of time that something is true. You can think of it as a logic argument.
As long as you live, they will never leave you alone.
The condition: said person being alone.
If them being alive is true, them being left alone is false.
Otherwise if them being alive is false, them being left alone is true.
These conditionals happen immediately and as far as we know apply forever. As soon as that person has died, they will be left alone. The property of them being alive lasts for however long they are alive, however long that is. "As long as" is generic enough to where we don't have to specify much to have a point with which the conditionals can change. In this example that point is the end of that persons life.
I will attend the conference as long as I can arrive on time.
The condition: that persons presence at the conference.
If they can guarantee arrival before the conference starts, them being present at the conference is true, otherwise it is false.
Written another way this can be "as long as me arriving on time is true, I will attend the conference." We don't know the exact time it can stay true. We just know that if it stays true they will attend the conference, otherwise they won't.
As long as the conditionals match, the outcome will be the expected outcome.
EDIT:
@Lawrence It's difficult to explain without using 'as long as'. Here's a to the point answer. I said "In a word, yes."; yes being an answer to the question on the last line. The first use that jumps out to me is the usage in wedding vows. Wikipedia claims that a 1549 prayer book included:
Wilte thou have this woman to thy wedded wife, to live together after Goddes ordeinaunce in the holy estate of matrimonie? Wilt thou love her, coumforte her, honor, and kepe her in sickenesse and in health? And forsaking all other kepe thee only to her, so long as you both shall live?
This is the first example. Assuming that extra piece of information in the comments on the second usage is true, I'd say that if the second usage dates to the 1800's, and from the workings described above, I would say that yes the second usage is derived from the first. Possibly becuase most people don't enter into life long agreements or anything as much anymore.
Both work with conditionals. The difference is the first does rely on some kind of time frame, the second relies mostly on the conditionals themselves while hinting at the time (either future, ongoing, or past) that the proper conditions are met. If that makes sense. So I would say that the second is derived from the first. It isn't too hard to make a jump from first meaning to the second one. Time just plays a backseat role in the second usage.
Expanding on the second example, the person will attend the conference if, up to the point the conference starts, they are able to assure that they will arrive on time. That point during which it can change at any time is the time frame, but we are more worried about the conditionals.
In the OED under "As", section B.2.a, there's an example that has both senses although it uses "so long as" - which I think is equivalent.
1842 Longfellow in Graham's Mag. Oct. 176/1 "So long as you are innocent fear nothing."
It can be taken to mean "for the period of time" or "provided that". It seems to argue that the second sense developed from the first which goes way back.
1567 Gude & Godlie Ball. (S.T.S.) 27 "Als lang as I leue on this eird."