SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@
SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@
+CPPFLAGS=@CPPFLAGS@
CCFLAGS=@CFLAGS@ -I.. -I../hdrs @OPENSSL_INCLUDES@ @CPPFLAGS@ @PCRE_CFLAGS@ -Werror
LDFLAGS=@LDFLAGS@ @OPENSSL_INCLUDES@
CLIBS=@LIBS@ @PCRE_LIBS@ @LIBLTDL@ @LIBLUA@ @OPENSSL_LIBS@
AC_PREREQ([2.65])
AC_INIT([CobraMUSH], [0.80], [http://redmine.cobramush.org])
AC_CONFIG_HEADERS(config.h)
+AX_FIND_COMMON_PREFIXES([lua5.1])
m4_include(m4/confsetup.m4)
--- /dev/null
+dnl AX_FIND_COMMON_PREFIXES([list of include subdirectories])
+AC_DEFUN([AX_FIND_COMMON_PREFIXES], [
+ AC_MSG_NOTICE([Scanning for common include/library prefixes...])
+ if test -n "$1"; then
+ for subdirectory in $1; do
+ AC_MSG_CHECKING([for /usr/include/$subdirectory])
+ if test -d "/usr/include/$subdirectory"; then
+ AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -I/usr/include/$subdirectory"
+ else
+ AC_MSG_RESULT([no])
+ fi
+ done
+ fi
+ for prefix in /usr/local /opt /opt/local /opt/ports /sw; do
+ AC_MSG_CHECKING([for $prefix/include])
+ if test -d "$prefix/include"; then
+ AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -I$prefix/include"
+ if test -n "$1"; then
+ for subdirectory in $1; do
+ AC_MSG_CHECKING([for $prefix/include/$subdirectory])
+ if test -d "$prefix/include/$subdirectory"; then
+ AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -I$prefix/include/$subdirectory"
+ else
+ AC_MSG_RESULT([no])
+ fi
+ done
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ AC_MSG_CHECKING([for $prefix/lib])
+ if test -d "$prefix/lib"; then
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -L$prefix/lib"
+ else
+ AC_MSG_RESULT([no])
+ fi
+ done
+])dnl