Added lua detection. configure now stops if it can't find system lua or
authorRick Bird <nveid@bender.theari.com>
Tue, 26 Apr 2011 06:49:28 +0000 (02:49 -0400)
committerRick Bird <nveid@bender.theari.com>
Tue, 26 Apr 2011 06:49:28 +0000 (02:49 -0400)
ltdl... Next step, add an argument to look use local installations
IssueID #240

Makefile.in
configure.ac

index fa34e7c0df0635a5d54d0196bdfacd26e12eedbd..987d5e8b1dad929a9498db3d0b7e90dd786cf2fd 100644 (file)
@@ -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@
index 7729087b3bae1e83c05fcfd7a1339684f35443a6..ba9ad41bd4112f9dd211293700bdbc19b8e776ce 100644 (file)
@@ -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