Software /
code /
prosody
Comparison
configure @ 9425:b741e9b9593b
configure: Fix incorrect syntax of '&&' in previous commit
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 01 Oct 2018 16:13:28 +0100 |
parent | 9424:3409d617dcd3 |
child | 9426:e290a60f1f09 |
comparison
equal
deleted
inserted
replaced
9424:3409d617dcd3 | 9425:b741e9b9593b |
---|---|
315 ;; | 315 ;; |
316 esac | 316 esac |
317 shift | 317 shift |
318 done | 318 done |
319 | 319 |
320 if [ "$PREFIX_SET" = "yes" && ! "$SYSCONFDIR_SET" = "yes" ] | 320 if [ "$PREFIX_SET" = "yes" ] && [ ! "$SYSCONFDIR_SET" = "yes" ] |
321 then | 321 then |
322 if [ "$PREFIX" = "/usr" ] | 322 if [ "$PREFIX" = "/usr" ] |
323 then SYSCONFDIR=/etc/$APP_DIRNAME | 323 then SYSCONFDIR=/etc/$APP_DIRNAME |
324 else SYSCONFDIR=$PREFIX/etc/$APP_DIRNAME | 324 else SYSCONFDIR=$PREFIX/etc/$APP_DIRNAME |
325 fi | 325 fi |
326 fi | 326 fi |
327 | 327 |
328 if [ "$PREFIX_SET" = "yes" && ! "$DATADIR_SET" = "yes" ] | 328 if [ "$PREFIX_SET" = "yes" ] && [ ! "$DATADIR_SET" = "yes" ] |
329 then | 329 then |
330 if [ "$PREFIX" = "/usr" ] | 330 if [ "$PREFIX" = "/usr" ] |
331 then DATADIR=/var/lib/$APP_DIRNAME | 331 then DATADIR=/var/lib/$APP_DIRNAME |
332 else DATADIR=$PREFIX/var/lib/$APP_DIRNAME | 332 else DATADIR=$PREFIX/var/lib/$APP_DIRNAME |
333 fi | 333 fi |
334 fi | 334 fi |
335 | 335 |
336 if [ "$PREFIX_SET" = "yes" && ! "$LIBDIR_SET" = "yes" ] | 336 if [ "$PREFIX_SET" = "yes" ] && [ ! "$LIBDIR_SET" = "yes" ] |
337 then | 337 then |
338 LIBDIR=$PREFIX/lib | 338 LIBDIR=$PREFIX/lib |
339 fi | 339 fi |
340 | 340 |
341 detect_lua_version() { | 341 detect_lua_version() { |
368 find_lua="$LUA_BINDIR" | 368 find_lua="$LUA_BINDIR" |
369 fi | 369 fi |
370 else | 370 else |
371 find_lua=$(find_program lua"$suffix") | 371 find_lua=$(find_program lua"$suffix") |
372 fi | 372 fi |
373 if [ -n "$find_lua" && -x "$find_lua/lua$suffix" ] | 373 if [ -n "$find_lua" ] && [ -x "$find_lua/lua$suffix" ] |
374 then | 374 then |
375 if detect_lua_version "$find_lua/lua$suffix" | 375 if detect_lua_version "$find_lua/lua$suffix" |
376 then | 376 then |
377 echo "Lua interpreter found: $find_lua/lua$suffix..." | 377 echo "Lua interpreter found: $find_lua/lua$suffix..." |
378 if [ "$LUA_BINDIR_SET" != "yes" ] | 378 if [ "$LUA_BINDIR_SET" != "yes" ] |
391 } | 391 } |
392 | 392 |
393 lua_interp_found=no | 393 lua_interp_found=no |
394 if [ "$LUA_SUFFIX_SET" != "yes" ] | 394 if [ "$LUA_SUFFIX_SET" != "yes" ] |
395 then | 395 then |
396 if [ "$LUA_VERSION_SET" = "yes" && "$LUA_VERSION" = "5.1" ] | 396 if [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.1" ] |
397 then | 397 then |
398 suffixes="5.1 51 -5.1 -51" | 398 suffixes="5.1 51 -5.1 -51" |
399 elif [ "$LUA_VERSION_SET" = "yes" && "$LUA_VERSION" = "5.2" ] | 399 elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.2" ] |
400 then | 400 then |
401 suffixes="5.2 52 -5.2 -52" | 401 suffixes="5.2 52 -5.2 -52" |
402 elif [ "$LUA_VERSION_SET" = "yes" && "$LUA_VERSION" = "5.3" ] | 402 elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] |
403 then | 403 then |
404 suffixes="5.3 53 -5.3 -53" | 404 suffixes="5.3 53 -5.3 -53" |
405 else | 405 else |
406 suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" | 406 suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" |
407 fi | 407 fi |
416 search_interpreter "$LUA_SUFFIX" && { | 416 search_interpreter "$LUA_SUFFIX" && { |
417 lua_interp_found=yes | 417 lua_interp_found=yes |
418 } | 418 } |
419 fi | 419 fi |
420 | 420 |
421 if [ "$lua_interp_found" != "yes" && "$RUNWITH_SET" != "yes" ] | 421 if [ "$lua_interp_found" != "yes" ] && [ "$RUNWITH_SET" != "yes" ] |
422 then | 422 then |
423 if [ "$LUA_VERSION_SET" ]; then | 423 if [ "$LUA_VERSION_SET" ]; then |
424 interp="Lua $LUA_VERSION"; | 424 interp="Lua $LUA_VERSION"; |
425 else | 425 else |
426 interp="Lua"; | 426 interp="Lua"; |
432 fi | 432 fi |
433 echo "$interp interpreter not found in $where" | 433 echo "$interp interpreter not found in $where" |
434 die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help." | 434 die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help." |
435 fi | 435 fi |
436 | 436 |
437 if [ "$LUA_VERSION_SET" = "yes" && "$RUNWITH_SET" != "yes" ] | 437 if [ "$LUA_VERSION_SET" = "yes" ] && [ "$RUNWITH_SET" != "yes" ] |
438 then | 438 then |
439 echo_n "Checking if $LUA_BINDIR/lua$LUA_SUFFIX is Lua version $LUA_VERSION... " | 439 echo_n "Checking if $LUA_BINDIR/lua$LUA_SUFFIX is Lua version $LUA_VERSION... " |
440 if detect_lua_version "$LUA_BINDIR/lua$LUA_SUFFIX" | 440 if detect_lua_version "$LUA_BINDIR/lua$LUA_SUFFIX" |
441 then | 441 then |
442 echo "yes" | 442 echo "yes" |
516 | 516 |
517 OPENSSL_LIBS="-l$OPENSSL_LIB" | 517 OPENSSL_LIBS="-l$OPENSSL_LIB" |
518 | 518 |
519 if [ "$PRNG" = "OPENSSL" ]; then | 519 if [ "$PRNG" = "OPENSSL" ]; then |
520 PRNGLIBS=$OPENSSL_LIBS | 520 PRNGLIBS=$OPENSSL_LIBS |
521 elif [ "$PRNG" = "ARC4RANDOM" && "$(uname)" = "Linux" ]; then | 521 elif [ "$PRNG" = "ARC4RANDOM" ] && [ "$(uname)" = "Linux" ]; then |
522 PRNGLIBS="-lbsd" | 522 PRNGLIBS="-lbsd" |
523 fi | 523 fi |
524 | 524 |
525 # Write config | 525 # Write config |
526 | 526 |