version 1.28, 2010/06/24 09:25:15
|
version 1.34, 2010/08/09 13:52:12
|
Line 1
|
Line 1
|
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
AC_INIT([rpl],[4.0.16]) |
AC_INIT([rpl],[4.0.18]) |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AM_INIT_AUTOMAKE |
AM_INIT_AUTOMAKE |
Line 9 AC_CONFIG_HEADERS([rplconfig.h])
|
Line 9 AC_CONFIG_HEADERS([rplconfig.h])
|
dnl Libraries |
dnl Libraries |
NCURSES=ncurses-5.7-20100619 |
NCURSES=ncurses-5.7-20100619 |
READLINE=readline-6.1 |
READLINE=readline-6.1 |
UNITS=units-1.87 |
UNITS=units-1.88 |
GSL=gsl-1.14 |
GSL=gsl-1.14 |
GPP=gpp-2.24 |
GPP=gpp-2.24 |
GNUPLOT=gnuplot-4.4.0 |
GNUPLOT=gnuplot-4.4.0 |
FILE=file-5.03 |
FILE=file-5.03 |
ICONV=libiconv-1.13.1 |
ICONV=libiconv-1.13.1 |
SQLITE=sqlite-3.6.23.1 |
SQLITE=sqlite-3.7.0.1 |
OPENSSL=openssl-1.0.0a |
OPENSSL=openssl-1.0.0a |
|
|
dnl Checks for C compiler |
dnl Checks for C compiler |
AC_PROG_CC(gcc) |
AC_PROG_CC(gcc) |
|
|
|
EXT_SQL= |
|
|
if test x"$CC" != x""; then |
if test x"$CC" != x""; then |
GCC_VERSION_MAJEURE=`$CC -v 2>&1 | awk '/^gcc/ { print $3; }' | \ |
GCC_VERSION_MAJEURE=`$CC -v 2>&1 | awk '/^gcc/ { print $3; }' | \ |
awk -F. '{ printf("%s", $1);}'` |
awk -F. '{ printf("%s", $1);}'` |
Line 124 fi],[
|
Line 126 fi],[
|
] |
] |
) |
) |
|
|
|
AC_ARG_ENABLE(full-static, |
|
[ --enable-full-static build static RPL/2 engine [[default=shared]]], [ |
|
if test "$enableval" = "no"; then |
|
STATIC=no |
|
else |
|
STATIC=yes |
|
fi], |
|
STATIC=no) |
|
|
AC_ARG_ENABLE(final-encoding, |
AC_ARG_ENABLE(final-encoding, |
[ --enable-final-encoding force final encoding [[default=guessed]]], [ |
[ --enable-final-encoding force final encoding [[default=guessed]]], [ |
if test "$enableval" = "no"; then |
if test "$enableval" = "no"; then |
Line 249 fi
|
Line 260 fi
|
if test ! -d "$srcdir"/tools/$GSL; then |
if test ! -d "$srcdir"/tools/$GSL; then |
gunzip -c "$srcdir"/tools/$GSL.tar.gz | \ |
gunzip -c "$srcdir"/tools/$GSL.tar.gz | \ |
(cd "$srcdir/tools" && tar -xf -) |
(cd "$srcdir/tools" && tar -xf -) |
|
if test $(uname) = "OS/2"; then |
|
(cd "$srcdir"/tools/$GSL; \ |
|
TMP=$(mktemp tmp.XXXXXXXXXX); \ |
|
sed -e '1,$s/\${1+"\$@"}/"\$@"/g' ltmain.sh > $TMP; \ |
|
\mv -f $TMP ltmain.sh) |
|
fi |
fi |
fi |
if test ! -d "$srcdir"/tools/$GPP; then |
if test ! -d "$srcdir"/tools/$GPP; then |
gunzip -c "$srcdir"/tools/$GPP.tar.gz | \ |
gunzip -c "$srcdir"/tools/$GPP.tar.gz | \ |
Line 266 fi
|
Line 283 fi
|
if test ! -d "$srcdir"/tools/$SQLITE; then |
if test ! -d "$srcdir"/tools/$SQLITE; then |
gunzip -c "$srcdir"/tools/$SQLITE.tar.gz | \ |
gunzip -c "$srcdir"/tools/$SQLITE.tar.gz | \ |
(cd "$srcdir/tools" && tar -xf -) |
(cd "$srcdir/tools" && tar -xf -) |
|
(cd "$srcdir/tools"/$SQLITE && gunzip -c ../$SQLITE.diff.gz | patch -p1) |
fi |
fi |
if test ! -d tools/$OPENSSL; then |
if test ! -d tools/$OPENSSL; then |
gunzip -c "$srcdir"/tools/$OPENSSL.tar.gz | \ |
gunzip -c "$srcdir"/tools/$OPENSSL.tar.gz | \ |
Line 448 dnl Checks for libraries
|
Line 466 dnl Checks for libraries
|
AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !])) |
AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !])) |
AC_CHECK_LIB(pthread, main,, AC_MSG_ERROR([Can not find libpthread !])) |
AC_CHECK_LIB(pthread, main,, AC_MSG_ERROR([Can not find libpthread !])) |
|
|
|
dnl Check for union semun |
|
AC_CHECK_TYPE([union semun], SEMUN=-DUNION_SEMUN, SEMUN=-UUNION_SEMUN, [[ |
|
#include <sys/sem.h> |
|
]]) |
|
|
dnl Do we need to use -ldl? |
dnl Do we need to use -ldl? |
if test "$CYGWIN" != yes; then |
if test "$CYGWIN" != yes; then |
AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl", |
AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl", |
Line 470 AC_ARG_WITH(mysql,
|
Line 493 AC_ARG_WITH(mysql,
|
|
|
if test "x$with_mysql" = xcheck -o "x$with_mysql" = yes; then |
if test "x$with_mysql" = xcheck -o "x$with_mysql" = yes; then |
libMySQLinc="-I/usr/include" |
libMySQLinc="-I/usr/include" |
libMySQLlib="-L/usr/lib" |
libMySQLlib="/usr/lib" |
|
|
AC_MSG_CHECKING(for libmysql includes in /usr/include) |
AC_MSG_CHECKING(for libmysql includes in /usr/include) |
saved_CFLAGS="$CFLAGS" |
saved_CFLAGS="$CFLAGS" |
CFLAGS="$CFLAGS $libMySQLinc" |
CFLAGS="$CFLAGS -L/$libMySQLinc" |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT"; |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT"; |
libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"]) |
libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"]) |
CFLAGS=$saved_CFLAGS |
CFLAGS=$saved_CFLAGS |
Line 513 if test "x$with_mysql" = xcheck -o "x$wi
|
Line 536 if test "x$with_mysql" = xcheck -o "x$wi
|
else |
else |
if test "x$with_mysql" != xno; then |
if test "x$with_mysql" != xno; then |
libMySQLinc="-I$with_mysql/include" |
libMySQLinc="-I$with_mysql/include" |
libMySQLlib="-L$with_mysql/lib" |
libMySQLlib="$with_mysql/lib" |
|
|
AC_MSG_CHECKING(for libmysql includes in $with_mysql) |
AC_MSG_CHECKING(for libmysql includes in $with_mysql) |
saved_CFLAGS="$CFLAGS" |
saved_CFLAGS="$CFLAGS" |
Line 542 if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPP
|
Line 565 if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPP
|
if test $MYSQL_LIB = no; then |
if test $MYSQL_LIB = no; then |
AC_MSG_CHECKING(for libmysql libraries in $libMySQLlib) |
AC_MSG_CHECKING(for libmysql libraries in $libMySQLlib) |
saved_LIBS="$LIBS" |
saved_LIBS="$LIBS" |
LIBS="$LIBS $libMySQLlib $libMySQLinc -lmysqlclient_r" |
if test $STATIC = no; then |
|
LIBS="$LIBS -L/$libMySQLlib -lmysqlclient_r $libMySQLinc" |
|
else |
|
LIBS="$LIBS $libMySQLlib/libmysqlclient_r.a -lz $libMySQLinc" |
|
fi |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[MYSQL mysql; mysql_init(&mysql);]])],[AC_MSG_RESULT([yes]); MYSQL_LIB="yes"],[AC_MSG_RESULT([no]); MYSQL_LIB="no"]) |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[MYSQL mysql; mysql_init(&mysql);]])],[AC_MSG_RESULT([yes]); MYSQL_LIB="yes"],[AC_MSG_RESULT([no]); MYSQL_LIB="no"]) |
LIBS=$saved_LIBS; |
LIBS=$saved_LIBS; |
libMySQLlib="$libMySQLlib -lmysqlclient_r" |
if test $STATIC = no; then |
|
libMySQLlib="-L/$libMySQLlib -lmysqlclient_r" |
|
else |
|
libMySQLlib="$libMySQLlib/libmysqlclient_r.a" |
|
EXT_SQL="$EXT_SQL $libMySQLlib" |
|
fi |
fi |
fi |
|
|
if test $MYSQL_LIB = no; then |
if test $MYSQL_LIB = no; then |
Line 572 AC_ARG_WITH(postgresql,
|
Line 604 AC_ARG_WITH(postgresql,
|
|
|
if test "x$with_postgresql" = xcheck -o "x$with_postgresql" = xyes; then |
if test "x$with_postgresql" = xcheck -o "x$with_postgresql" = xyes; then |
libPgSQLinc="-I/usr/include" |
libPgSQLinc="-I/usr/include" |
libPgSQLlib="-L/usr/lib" |
libPgSQLlib="/usr/lib" |
|
|
AC_MSG_CHECKING(for libpq includes in /usr/include) |
AC_MSG_CHECKING(for libpq includes in /usr/include) |
saved_CFLAGS="$CFLAGS" |
saved_CFLAGS="$CFLAGS" |
Line 640 if test "x$with_postgresql" = xcheck -o
|
Line 672 if test "x$with_postgresql" = xcheck -o
|
else |
else |
if test "x$with_postgresql" != xno; then |
if test "x$with_postgresql" != xno; then |
libPgSQLinc="-I$with_postgresql/include" |
libPgSQLinc="-I$with_postgresql/include" |
libPgSQLlib="-L$with_postgresql/lib" |
libPgSQLlib="$with_postgresql/lib" |
|
|
AC_MSG_CHECKING(for libpq includes in $libPgSQLinc) |
AC_MSG_CHECKING(for libpq includes in $libPgSQLinc) |
saved_CFLAGS="$CFLAGS" |
saved_CFLAGS="$CFLAGS" |
Line 682 if test "$POSTGRESQL_SUPPORT" = "-DPOSTG
|
Line 714 if test "$POSTGRESQL_SUPPORT" = "-DPOSTG
|
if test $POSTGRESQL_LIB = no; then |
if test $POSTGRESQL_LIB = no; then |
AC_MSG_CHECKING(for libpq libraries in $libPgSQLlib) |
AC_MSG_CHECKING(for libpq libraries in $libPgSQLlib) |
saved_LIBS="$LIBS" |
saved_LIBS="$LIBS" |
LIBS="$LIBS $libPgSQLlib $libPgSQLinc -lpq" |
if test $STATIC = no; then |
|
LIBS="$LIBS -L/$libPgSQLlib $libPgSQLinc -lpq" |
|
else |
|
LIBS="$LIBS $libPgSQLlib/libpq.a $libPgSQLinc" |
|
fi |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[PGconn *conn; const char *conninfo="dbname=postgres"; conn = |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[PGconn *conn; const char *conninfo="dbname=postgres"; conn = |
PQconnectdb(conninfo);]])],[AC_MSG_RESULT([yes]); POSTGRESQL_LIB="yes"],[AC_MSG_RESULT([no]); POSTGRESQL_LIB="no"]) |
PQconnectdb(conninfo);]])],[AC_MSG_RESULT([yes]); POSTGRESQL_LIB="yes"],[AC_MSG_RESULT([no]); POSTGRESQL_LIB="no"]) |
LIBS=$saved_LIBS; |
LIBS=$saved_LIBS; |
libPgSQLlib="$libPgSQLlib -lpq" |
if test $STATIC = no; then |
|
libPgSQLlib="-L/$libPgSQLlib -lpq" |
|
else |
|
libPgSQLlib="$libPgSQLlib/libpq.a" |
|
EXT_SQL="$EXT_SQL $libPgSQLlib" |
|
fi |
fi |
fi |
fi |
fi |
|
|
Line 745 AC_FUNC_VPRINTF
|
Line 786 AC_FUNC_VPRINTF
|
AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \ |
AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \ |
strerror strspn strstr strtod) |
strerror strspn strstr strtod) |
|
|
ac_configure_args="$ac_configure_args --with-readline=builtin --disable-shared --enable-static" |
|
|
|
AC_CONFIG_SUBDIRS(tools/$NCURSES) |
AC_CONFIG_SUBDIRS(tools/$NCURSES) |
AC_CONFIG_SUBDIRS(tools/$READLINE) |
AC_CONFIG_SUBDIRS(tools/$READLINE) |
AC_CONFIG_SUBDIRS(tools/$GSL) |
AC_CONFIG_SUBDIRS(tools/$GSL) |
Line 761 AC_ARG_WITH(openssl_arch,
|
Line 800 AC_ARG_WITH(openssl_arch,
|
[ --with-openssl-arch=ARCH specify os and compiler for openssl (ARCH or list)], |
[ --with-openssl-arch=ARCH specify os and compiler for openssl (ARCH or list)], |
[], [with_openssl_arch=none]) |
[], [with_openssl_arch=none]) |
|
|
if test "x$with_openssl_arch" = xnone; then |
if test $(uname) = "OS/2"; then |
(cd tools/$OPENSSL && ./config) |
(cd tools/$OPENSSL && os2/OS2-EMX.cmd) |
elif test "x$with_openssl_arch" = xyes -o "x$with_openssl_arch" = xno; then |
|
(cd tools/$OPENSSL && ./Configure) |
|
AC_MSG_ERROR([OS/COMP informations are required!]) |
|
elif test "x$with_openssl_arch" = xlist; then |
|
(cd tools/$OPENSSL && ./Configure) |
|
AC_MSG_ERROR([Please specify OS and Architecture]) |
|
else |
else |
(cd tools/$OPENSSL && ./Configure $with_openssl_arch) |
if test "x$with_openssl_arch" = xnone; then |
|
(cd tools/$OPENSSL && ./config) |
|
elif test "x$with_openssl_arch" = xyes -o "x$with_openssl_arch" = xno; then |
|
(cd tools/$OPENSSL && ./Configure) |
|
AC_MSG_ERROR([OS/COMP informations are required!]) |
|
elif test "x$with_openssl_arch" = xlist; then |
|
(cd tools/$OPENSSL && ./Configure) |
|
AC_MSG_ERROR([Please specify OS and Architecture]) |
|
else |
|
(cd tools/$OPENSSL && ./Configure $with_openssl_arch) |
|
fi |
fi |
fi |
|
|
if test "$MYGNUPLOT" = "yes"; then |
if test "$MYGNUPLOT" = "yes"; then |
Line 842 DATE=$(env LC_ALL=C date +'%A %x, %X %Z'
|
Line 885 DATE=$(env LC_ALL=C date +'%A %x, %X %Z'
|
case $OS in |
case $OS in |
|
|
Darwin) |
Darwin) |
EXPORT_DYNAMIC=-flat_namespace |
EXPORT_DYNAMIC=-Wl,-flat_namespace |
NESTED_FUNCTIONS=-fnested-functions |
NESTED_FUNCTIONS=-fnested-functions |
SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES |
SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES |
|
SEMAPHORES_SYSV=-USEMAPHORES_SYSV |
CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING" |
CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING" |
|
ac_configure_args="$ac_configure_args --with-readline=builtin \ |
|
--disable-shared --enable-static" |
|
C_STANDARD=-std=gnu99 |
break ;; |
break ;; |
|
|
Cygwin) |
Cygwin) |
EXPORT_DYNAMIC=--export-all-symbols |
EXPORT_DYNAMIC=-Wl,--export-all-symbols |
NESTED_FUNCTIONS= |
NESTED_FUNCTIONS= |
SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES |
SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES |
|
SEMAPHORES_SYSV=-USEMAPHORES_SYSV |
|
ac_configure_args="$ac_configure_args --with-readline=builtin \ |
|
--disable-shared --enable-static" |
|
C_STANDARD=-std=gnu99 |
break ;; |
break ;; |
|
|
AIX) |
AIX) |
EXPORT_DYNAMIC=--export-dynamic |
EXPORT_DYNAMIC=-Wl,--export-dynamic |
NESTED_FUNCTIONS= |
NESTED_FUNCTIONS= |
SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES |
SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES |
|
SEMAPHORES_SYSV=-USEMAPHORES_SYSV |
|
ac_configure_args="$ac_configure_args --with-readline=builtin \ |
|
--disable-shared --enable-static" |
|
C_STANDARD=-std=gnu99 |
break ;; |
break ;; |
|
|
|
OS/2) |
|
MALLOC= |
|
OS=OS2 |
|
FINAL_ENCODING=UTF-8 |
|
NESTED_FUNCTIONS= |
|
EXPORT_DYNAMIC=-Zmap |
|
SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES |
|
SEMAPHORES_SYSV=-DSEMAPHORES_SYSV |
|
ac_configure_args="$ac_configure_args --without-readline \ |
|
--without-cairo --disable-shared --enable-static" |
|
C_STANDARD= |
|
break;; |
|
|
*) |
*) |
EXPORT_DYNAMIC=--export-dynamic |
EXPORT_DYNAMIC=-Wl,--export-dynamic |
NESTED_FUNCTIONS= |
NESTED_FUNCTIONS= |
SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES |
SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES |
|
SEMAPHORES_SYSV=-USEMAPHORES_SYSV |
|
ac_configure_args="$ac_configure_args --with-readline=builtin \ |
|
--disable-shared --enable-static" |
|
C_STANDARD=-std=gnu99 |
break ;; |
break ;; |
|
|
esac |
esac |
|
|
|
AC_SUBST(C_STANDARD) |
AC_SUBST(EXPORT_DYNAMIC) |
AC_SUBST(EXPORT_DYNAMIC) |
AC_SUBST(NESTED_FUNCTIONS) |
AC_SUBST(NESTED_FUNCTIONS) |
AC_SUBST(SEMAPHORES_NOMMES) |
AC_SUBST(SEMAPHORES_NOMMES) |
|
AC_SUBST(SEMAPHORES_SYSV) |
|
AC_SUBST(SEMUN) |
|
|
AC_SUBST(NCURSES) |
AC_SUBST(NCURSES) |
AC_SUBST(READLINE) |
AC_SUBST(READLINE) |
Line 886 AC_SUBST(FINAL_ENCODING)
|
Line 961 AC_SUBST(FINAL_ENCODING)
|
AC_SUBST(DATE) |
AC_SUBST(DATE) |
AC_SUBST(DATE_FR) |
AC_SUBST(DATE_FR) |
AC_SUBST(MALLOC) |
AC_SUBST(MALLOC) |
|
AC_SUBST(EXT_SQL) |
|
|
AC_SUBST(CFLAGS) |
AC_SUBST(CFLAGS) |
AC_SUBST(CXXFLAGS) |
AC_SUBST(CXXFLAGS) |