From: Rick Bird Date: Tue, 26 Apr 2011 06:49:28 +0000 (-0400) Subject: Added lua detection. configure now stops if it can't find system lua or X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=6451ad61a1aac3c116ca1df66b3bfb61d393500c;p=cobramush.git Added lua detection. configure now stops if it can't find system lua or ltdl... Next step, add an argument to look use local installations IssueID #240 --- diff --git a/Makefile.in b/Makefile.in index fa34e7c..987d5e8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@ CCFLAGS=@CFLAGS@ -I.. -I../hdrs -I/usr/include/lua5.1 @CPPFLAGS@ @PCRE_CFLAGS@ -Werror LDFLAGS=@LDFLAGS@ -CLIBS=@LIBS@ @PCRE_LIBS@ @LIBLTDL@ -llua5.1 +CLIBS=@LIBS@ @PCRE_LIBS@ @LIBLTDL@ @LIBLUA@ INSTALL=@INSTALL@ INSTALLDIR=$installdir CP=@CP@ diff --git a/configure.ac b/configure.ac index 7729087..ba9ad41 100644 --- a/configure.ac +++ b/configure.ac @@ -23,14 +23,6 @@ fi AC_LANG(C) -AC_CHECK_HEADER([ltdl.h], - [AC_CHECK_LIB([ltdl], [lt_dladvise_init], - [LIBLTDL=-lltdl], [LIBLTDL=])], - [LIBLTDL=]) - -AC_SUBST([LIBLTDL]) - - ### Programs AC_PATH_PROG(CAT, cat) @@ -201,6 +193,26 @@ AC_CHECK_LIB(crypt, crypt) LIB_SOCKET_NSL AC_CHECK_LIB(fam, FAMOpen) +# Make these smarters.. And allow for local packages to exist +AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_LIB([ltdl], [lt_dladvise_init], + [LIBLTDL=-lltdl], + AC_MSG_ERROR([Advise your server admin to install libltdl]) + )], + AC_MSG_ERROR([Advise your server admin to install libltdl]) + ) +AC_CHECK_HEADER([lua5.1/lua.h], + [AC_CHECK_LIB([lua5.1], [lua_close], + [LIBLUA=-llua5.1], + AC_MSG_ERROR([No lua found on your system.]) + )], + AC_MSG_ERROR([No lua found on your system.]) + ) +AC_SUBST([LIBLTDL]) +AC_SUBST([LIBLUA]) + + + if test "$enable_zlib" = "yes"; then AC_CHECK_LIB(z, gzungetc) fi