diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-12-30 19:19:49 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-12-30 19:19:49 +0000 |
commit | b2170461c63561efff2fc3736c51856468f56d87 (patch) | |
tree | 91b868be0dbf9417795fe95ab2900158ee2461df | |
parent | 9864365f5c84efdcf8cb3d825737662089d2c492 (diff) | |
download | usdx-b2170461c63561efff2fc3736c51856468f56d87.tar.gz usdx-b2170461c63561efff2fc3736c51856468f56d87.tar.xz usdx-b2170461c63561efff2fc3736c51856468f56d87.zip |
The official name of the pkgconfig file is lua.pc (e.g. used in Mac OS X) and was renamed for Ubuntu to lua5.1.pc. Check for lua.pc and lua5.1.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2059 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rwxr-xr-x | Lua/configure | 67 | ||||
-rw-r--r-- | Lua/configure.ac | 7 |
2 files changed, 72 insertions, 2 deletions
diff --git a/Lua/configure b/Lua/configure index ad4d4413..2755c9a8 100755 --- a/Lua/configure +++ b/Lua/configure @@ -4526,6 +4526,8 @@ See the pkg-config man page for more details. # find lua 5.1 +# (K)Ubuntu uses lua5.1.pc, Mac OS X and other +# linux distributions use lua.pc have_lib="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua5.1" >&5 @@ -4571,7 +4573,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } # check if package is required - if test xyes = xyes -o x"$with_lua" = xyes ; then + if test xno = xyes -o x"$with_lua" = xyes ; then # print error message and quit err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1"` as_fn_error " @@ -4587,6 +4589,69 @@ See the pkg-config man page for more details. fi fi +if [ x$lua_HAVE = xno ]; then + + have_lib="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua >= 5.1" >&5 +$as_echo_n "checking for lua >= 5.1... " >&6; } + if test x"$with_lua" = xnocheck; then + # do not call pkg-config, use user settings + have_lib="yes" + elif test x"$with_lua" != xno; then + # check if package exists + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + have_lib="yes" + lua_LIBS=`$PKG_CONFIG --libs --silence-errors "lua >= 5.1"` + lua_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "lua >= 5.1"` + lua_LIBDIRS=` + echo "$lua_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//' +` + # add library directories to LIBS (ignore *_LIBS for now) + if test -n "$lua_LIBDIRS"; then + LIBS="$LIBS $lua_LIBDIRS" + fi + +fi + fi + if test x$have_lib = xyes; then + lua_HAVE="yes" + if test -n "$lua_LIBDIRS"; then + # show additional lib-dirs + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($lua_LIBDIRS)" >&5 +$as_echo "yes ($lua_LIBDIRS)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + else + lua_HAVE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # check if package is required + if test xyes = xyes -o x"$with_lua" = xyes ; then + # print error message and quit + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua >= 5.1"` + as_fn_error " + +$err_msg + +Alternatively, you may set --with-lua=nocheck and the environment +variables lua_[...] (see configure --help) +to appropriate values to avoid the need to call pkg-config. + +See the pkg-config man page for more details. +" "$LINENO" 5 + fi + fi + +fi # find FFMpeg # Note: do not use the min/max version parameters with ffmpeg diff --git a/Lua/configure.ac b/Lua/configure.ac index 02d57a2a..898af362 100644 --- a/Lua/configure.ac +++ b/Lua/configure.ac @@ -167,7 +167,12 @@ PKG_HAVE([freetype], [freetype2], yes) PKG_HAVE([sqlite3], [sqlite3], yes) # find lua 5.1 -PKG_HAVE([lua], [lua5.1], yes) +# (K)Ubuntu uses lua5.1.pc, Mac OS X and other +# linux distributions use lua.pc +PKG_HAVE([lua], [lua5.1], no) +if [[ x$lua_HAVE = xno ]]; then + PKG_HAVE([lua], [lua >= 5.1], yes) +fi # find FFMpeg # Note: do not use the min/max version parameters with ffmpeg |