--- rpl/Attic/configure.in 2010/05/19 09:22:32 1.25 +++ rpl/Attic/configure.in 2011/09/16 18:02:43 1.88 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rpl],[4.0.15]) +AC_INIT([rpl],[4.1.3]) AC_CANONICAL_TARGET AC_CANONICAL_TARGET AM_INIT_AUTOMAKE @@ -7,20 +7,32 @@ AC_SUBST(target_cpu) AC_CONFIG_HEADERS([rplconfig.h]) dnl Libraries -NCURSES=ncurses-5.7-20100501 -READLINE=readline-6.1 -UNITS=units-1.87 -GSL=gsl-1.14 -GPP=gpp-2.24 -GNUPLOT=gnuplot-4.4.0 +NCURSES=ncurses-5.9 +READLINE=readline-6.2 +UNITS=units-1.88 +GSL=gsl-1.15 +GPP=gpp-3.0 +GNUPLOT=gnuplot-4.4.3 FILE=file-5.03 ICONV=libiconv-1.13.1 -SQLITE=sqlite-3.6.23.1 -OPENSSL=openssl-1.0.0 +SQLITE=sqlite-3.7.7.1 +OPENSSL=openssl-1.0.0e +OPENMOTIF=openmotif-2.3.3 +LIBXPM=libXpm-3.5.9 +SIGSEGV=libsigsegv-2.6 + +GMP=gmp-5.0.2 +MPFR=mpfr-3.0.1 +NTL=ntl-5.5.2 +COCOA=CoCoALib-0.9943 +PARI=pari-2.5.0 +GIAC=giac-0.9.3 dnl Checks for C compiler AC_PROG_CC(gcc) +EXT_SQL= + if test x"$CC" != x""; then GCC_VERSION_MAJEURE=`$CC -v 2>&1 | awk '/^gcc/ { print $3; }' | \ awk -F. '{ printf("%s", $1);}'` @@ -51,10 +63,30 @@ fi dnl Checks for C++ compiler AC_PROG_CXX(g++) -if test "$GXX" != yes; then +if test "$CXX" != "g++"; then AC_MSG_ERROR([Cannot find g++! You have to install it.]) fi +if test x"$CXX" != x""; then + GCC_VERSION_MAJEURE=`$CXX -v 2>&1 | awk '/^gcc/ { print $3; }' | \ + awk -F. '{ printf("%s", $1);}'` + GCC_VERSION_MINEURE=`$CXX -v 2>&1 | awk '/^gcc/ { print $3; }' | \ + awk -F. '{ printf("%s", $2);}'` + if test $GCC_VERSION_MAJEURE -ge 5; then + OPTIMISATION_GXX=-O3 + else + if test $GCC_VERSION_MAJEURE -ge 4 -a $GCC_VERSION_MINEURE -ge 4; then + OPTIMISATION_GXX=-O3 + else + if test $GCC_VERSION_MAJEURE -ge 3; then + OPTIMISATION_GXX=-O2 + else + AC_MSG_ERROR([Cannot find decent or recent g++ (g++-4.3 or better)!]) + fi + fi + fi +fi + dnl Checks for Fortran 77 compiler AC_PROG_F77(gfortran) @@ -105,35 +137,140 @@ if test "$ac_x_libraries" != "no"; then fi fi +dnl 32 bits ABI +AC_ARG_WITH(32bits-abi, +[ --with-32bits-abi force 32bits ABI (multilib)],[ +if test "$with-32bits-abi" = "no"; then + ABI= +else + ABI=-m32 +fi],[ + ABI= + ] +) + +if test x$ABI = x; then +AC_ARG_WITH(64bits-abi, +[ --with-64bits-abi force 64bits ABI (multilib)],[ +if test "$with-64bits-abi" = "no"; then + ABI= +else + ABI=-m64 +fi],[ + ABI= + ] +) +fi + +LDFLAGS="$LDFLAGS $ABI" + +dnl RPL/CAS support +AC_ARG_WITH(rplcas, +[ --with-rplcas compile rplcas (default=no)],[ +if test "$with-rplcas" = "no"; then + RPLCAS=-URPLCAS + LIBRPLCAS= +else + RPLCAS=-DRPLCAS + LIBRPLCAS=\$\(top_builddir\)/rplcas/lib/librplcas.a +fi],[ + RPLCAS=-URPLCAS + LIBRPLCAS= + ] +) + +AC_SUBST(ABI) +AC_SUBST(RPLCAS) +AC_SUBST(LIBRPLCAS) + dnl Options AC_ARG_ENABLE(optimization, [ --enable-optimization set compiler flags [[default=environment variables -O3]]], [ if test "$enableval" = "no"; then - CFLAGS= - FFLAGS= - CXXFLAGS= - FCFLAGS= -else - CFLAGS="$CFLAGS $enable_optimization" - FFLAGS="$FFLAGS $enable_optimization" - FCFLAGS="$FCFLAGS $enable_optimization" + CFLAGS=$ABI + FFLAGS=$ABI + CXXFLAGS=$ABI + FCFLAGS=$ABI +else + CFLAGS="$CFLAGS $ABI $enable_optimization" + FFLAGS="$FFLAGS $ABI $enable_optimization" + CXXFLAGS="$CXXFLAGS $ABI $enable_optimization" + FCFLAGS="$FCFLAGS $ABI $enable_optimization" fi],[ - CFLAGS="$CFLAGS $OPTIMISATION_C" - FFLAGS="$FFLAGS $OPTIMISATION_F" - FCFLAGS="$FCFLAGS $OPTIMISATION_F" + CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" + FFLAGS="$FFLAGS $ABI $OPTIMISATION_F" + CXXFLAGS="$CXXFLAGS $ABI $OPTIMISATION_CXX" + FCFLAGS="$FCFLAGS $ABI $OPTIMISATION_F" ] ) +AC_ARG_ENABLE(sysv-semaphores, +[ --enable-sysv-ipcs use SystemV IPC functions [[default=guessed]]], [ +if test "$enableval" = "no"; then + IPCS_SYSV=no +else + IPCS_SYSV=yes +fi], +[AC_MSG_CHECKING([for POSIX semaphores]) +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include +#include +#include + ], +[ int fd; char *sem = "/sem.test"; +fd = shm_open(sem , O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); + close(fd); + shm_unlink(sem); + return(0); +])], +[IPCS_SYSV=-UIPCS_SYSV; AC_MSG_RESULT(yes)], +[IPCS_SYSV=-DIPCS_SYSV; AC_MSG_RESULT(no)] + )] +) + +if test "$IPCS_SYSV" = "-UIPCS_SYSV"; then +REG=$LDFLAGS +LDFLAGS=-pthread +AC_MSG_CHECKING([for POSIX anonymous semaphores]) +AC_RUN_IFELSE( +[AC_LANG_PROGRAM([#include + ], +[ sem_t sem; + if (sem_init(&sem, 1, 0) != 0) return(1); + sem_destroy(&sem); + return(0); +])], +[SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES; AC_MSG_RESULT(yes)], +[SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES; AC_MSG_RESULT(no)] + ) +LDFLAGS=$REG +REG="" +else + SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES +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, [ --enable-final-encoding force final encoding [[default=guessed]]], [ if test "$enableval" = "no"; then FINAL_ENCODING="\$(shell locale charmap | \ \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')" + FORCED_FINAL_ENCODING=0 else FINAL_ENCODING="$enable_final_encoding" -fi], + FORCED_FINAL_ENCODING=1 +fi], [ +FORCED_FINAL_ENCODING=0 FINAL_ENCODING="\$(shell locale charmap | \ - \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')") + \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')"]) AC_ARG_ENABLE(tex, [ --enable-tex provide the TeX support [[default=guessed]]], [ @@ -181,25 +318,35 @@ else FORCE_GNUPLOT_PATH=-UFORCE_GNUPLOT_PATH fi]) +libX="" +LIBMOTIF="" +INCMOTIF="" +BUILD_OPENMOTIF="" + AC_ARG_ENABLE(motif, [ --enable-motif provide the Motif support [[default=guessed]]], [ if test "$enableval" = "no"; then MOTIF_SUPPORT="-UMOTIF_SUPPORT" else - CFLAGS_ORIG=$CFLAGS - LIBS_ORIG=$LIBS - CFLAGS="$CFLAGS $X_CFLAGS" - LIBS="$LIB $X_LIBS" - AC_CHECK_LIB(Xm, main, MOTIF_SUPPORT="-DMOTIF_SUPPORT", MOTIF_SUPPORT="-UMOTIF_SUPPORT") - if test "$MOTIF_SUPPORT" = "-UMOTIF_SUPPORT"; then - AC_MSG_WARN([Can not find Motif! You may install it. -Motif flag is disabled. -]) - fi - LIBS=$LIBS_ORIG - CFLAGS=$CFLAGS_ORIG + MOTIF_SUPPORT="-DMOTIF_SUPPORT" fi], -MOTIF_SUPPORT=guessed) +if test "$have_x" == "yes"; then + MOTIF_SUPPORT="-DMOTIF_SUPPORT" +else + MOTIF_SUPPORT="-UMOTIF_SUPPORT" +fi) + +if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then + libX="$X_LIBS -lXt -lX11" + LIBMOTIF="\$(top_builddir)/tools/$OPENMOTIF/lib/Xm/.libs/libXm.a \ + \$(top_builddir)/tools/$LIBXPM/src/.libs/libXpm.a" + INCMOTIF="-I\$(top_srcdir)/tools/$OPENMOTIF/lib \ + -I\$(top_builddir)/tools/$OPENMOTIF/lib \ + -I\$(top_builddir)/tools/$LIBXPM/include" + BUILD_OPENMOTIF="$LIBXPM $OPENMOTIF" + AC_CONFIG_SUBDIRS(tools/$LIBXPM) + AC_CONFIG_SUBDIRS(tools/$OPENMOTIF) +fi AC_ARG_ENABLE(experimental, [ --enable-experimental enable experimental code [[default=no]]], [ @@ -214,12 +361,9 @@ AC_ARG_ENABLE(debug, [ --enable-debug enable debug code [[default=no]]], [ if test "$enableval" = "no"; then DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS" - MALLOC="\$(top_builddir)/ptmalloc3/libptmalloc3.a" else DEBUG="-DDEBUG_MEMOIRE -UDEBUG_ERREURS" - MALLOC="" -fi], [DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS" - MALLOC="\$(top_builddir)/ptmalloc3/libptmalloc3.a"]) +fi], [DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS"]) AC_ARG_ENABLE(profile, [ --enable-profile enable profile code [[default=no]]], [ @@ -237,6 +381,10 @@ fi if test ! -d "$srcdir"/tools/$NCURSES; then gunzip -c "$srcdir"/tools/$NCURSES.tar.gz | \ (cd "$srcdir/tools" && tar -xf -) + (cd "$srcdir/tools/"$NCURSES && \ + for i in ../$NCURSES*.patch.gz; + do gunzip -c $i | patch -p1; + done); fi if test ! -d "$srcdir"/tools/$READLINE; then gunzip -c "$srcdir"/tools/$READLINE.tar.gz | \ @@ -249,6 +397,12 @@ fi if test ! -d "$srcdir"/tools/$GSL; then gunzip -c "$srcdir"/tools/$GSL.tar.gz | \ (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 if test ! -d "$srcdir"/tools/$GPP; then gunzip -c "$srcdir"/tools/$GPP.tar.gz | \ @@ -267,10 +421,49 @@ if test ! -d "$srcdir"/tools/$SQLITE; th gunzip -c "$srcdir"/tools/$SQLITE.tar.gz | \ (cd "$srcdir/tools" && tar -xf -) fi +if test ! -d "$srcdir"/tools/$SIGSEGV; then + gunzip -c "$srcdir"/tools/$SIGSEGV.tar.gz | \ + (cd "$srcdir/tools" && tar -xf -) +fi +if test ! -d "$srcdir"/tools/$OPENMOTIF; then + gunzip -c "$srcdir"/tools/$OPENMOTIF.tar.gz | \ + (cd "$srcdir/tools" && tar -xf -) +fi +if test ! -d "$srcdir"/tools/$LIBXPM; then + gunzip -c "$srcdir"/tools/$LIBXPM.tar.gz | \ + (cd "$srcdir/tools" && tar -xf -) +fi if test ! -d tools/$OPENSSL; then gunzip -c "$srcdir"/tools/$OPENSSL.tar.gz | \ (cd tools && tar -xf -) fi +if test ! -d rplcas; then + mkdir rplcas +fi +if test ! -d "$srcdir"/rplcas/$GMP; then + gunzip -c "$srcdir"/rplcas/$GMP.tar.gz | \ + (cd "$srcdir/rplcas" && tar -xf -) +fi +if test ! -d "$srcdir"/rplcas/$MPFR; then + gunzip -c "$srcdir"/rplcas/$MPFR.tar.gz | \ + (cd "$srcdir/rplcas" && tar -xf -) +fi +if test ! -d rplcas/$NTL; then + gunzip -c "$srcdir"/rplcas/$NTL.tar.gz | \ + (cd rplcas && tar -xf -) +fi +if test ! -d rplcas/$COCOA; then + gunzip -c "$srcdir"/rplcas/$COCOA.tar.gz | \ + (cd rplcas && tar -xf -) +fi +if test ! -d rplcas/$PARI; then + gunzip -c "$srcdir"/rplcas/$PARI.tar.gz | \ + (cd rplcas && tar -xf -) +fi +if test ! -d "$srcdir"/rplcas/$GIAC; then + gunzip -c "$srcdir"/rplcas/$GIAC.tar.gz | \ + (cd "$srcdir/rplcas" && tar -xf -) +fi dnl Default installation directory AC_PREFIX_DEFAULT(/usr/local) @@ -298,7 +491,10 @@ AC_PROG_RANLIB dnl Checks for nawk AC_CHECK_PROG(AWK, nawk, yes, no) if test "$AWK" = no; then - AC_MSG_ERROR([Can not find nawk !]) + AC_CHECK_PROG(AWK, gawk, yes, no) + if test "$AWK" = no; then + AC_MSG_ERROR([Can not find nawk !]) + fi fi dnl Checks for sed @@ -394,41 +590,6 @@ else fi fi -if test "$MOTIF_SUPPORT" = guessed; then - CFLAGS_ORIG=$CFLAGS - LIBS_ORIG=$LIBS - CFLAGS="$CFLAGS $X_CFLAGS" - LIBS="$LIB $X_LIBS" - AC_CHECK_LIB(Xm, main, MOTIF_SUPPORT="-DMOTIF_SUPPORT", MOTIF_SUPPORT="-UMOTIF_SUPPORT") - if test "$MOTIF_SUPPORT" = "-UMOTIF_SUPPORT"; then - AC_MSG_WARN([Cannot find Motif! You may install it. -Motif flag is disabled. -]) - fi - LIBS=$LIBS_ORIG - CFLAGS=$CFLAGS_ORIG -fi - -if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then - CFLAGS_ORIG=$CFLAGS - LIBS_ORIG=$LIBS - CFLAGS="$CFLAGS $X_CFLAGS" - LIBS="$LIB $X_LIBS" - AC_CHECK_LIB(Xpm, main, MOTIF_SUPPORT="-DMOTIF_SUPPORT", MOTIF_SUPPORT="-UMOTIF_SUPPORT") - if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then - libX="$X_LIBS -lXm -lXpm -lXt -lX11" - else - libX="" - AC_MSG_WARN([Cannot find libXpm! You may install it. -Motif flag is disabled. -]) - fi - LIBS=$LIBS_ORIG - CFLAGS=$CFLAGS_ORIG -else - libX="" -fi - dnl Substitutions AC_SUBST(GNUPLOT_SUPPORT) AC_SUBST(FORCE_GNUPLOT_PATH) @@ -448,6 +609,17 @@ dnl Checks for libraries AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !])) 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 +]]) + +dnl Check for IPv6 support +AC_CHECK_TYPE([struct sockaddr_in6], IPV6=-DIPV6, IPV6=-UIPV6, [[ +#include +#include +]]) + dnl Do we need to use -ldl? if test "$CYGWIN" != yes; then AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl", @@ -470,11 +642,11 @@ AC_ARG_WITH(mysql, if test "x$with_mysql" = xcheck -o "x$with_mysql" = yes; then libMySQLinc="-I/usr/include" - libMySQLlib="-L/usr/lib" + libMySQLlib="/usr/lib" AC_MSG_CHECKING(for libmysql includes in /usr/include) 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"; libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"]) CFLAGS=$saved_CFLAGS @@ -513,7 +685,7 @@ if test "x$with_mysql" = xcheck -o "x$wi else if test "x$with_mysql" != xno; then libMySQLinc="-I$with_mysql/include" - libMySQLlib="-L$with_mysql/lib" + libMySQLlib="$with_mysql/lib" AC_MSG_CHECKING(for libmysql includes in $with_mysql) saved_CFLAGS="$CFLAGS" @@ -542,10 +714,19 @@ if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPP if test $MYSQL_LIB = no; then AC_MSG_CHECKING(for libmysql libraries in $libMySQLlib) 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"]) 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 if test $MYSQL_LIB = no; then @@ -572,7 +753,7 @@ AC_ARG_WITH(postgresql, if test "x$with_postgresql" = xcheck -o "x$with_postgresql" = xyes; then libPgSQLinc="-I/usr/include" - libPgSQLlib="-L/usr/lib" + libPgSQLlib="/usr/lib" AC_MSG_CHECKING(for libpq includes in /usr/include) saved_CFLAGS="$CFLAGS" @@ -640,7 +821,7 @@ if test "x$with_postgresql" = xcheck -o else if test "x$with_postgresql" != xno; then libPgSQLinc="-I$with_postgresql/include" - libPgSQLlib="-L$with_postgresql/lib" + libPgSQLlib="$with_postgresql/lib" AC_MSG_CHECKING(for libpq includes in $libPgSQLinc) saved_CFLAGS="$CFLAGS" @@ -682,11 +863,20 @@ if test "$POSTGRESQL_SUPPORT" = "-DPOSTG if test $POSTGRESQL_LIB = no; then AC_MSG_CHECKING(for libpq libraries in $libPgSQLlib) 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 = PQconnectdb(conninfo);]])],[AC_MSG_RESULT([yes]); POSTGRESQL_LIB="yes"],[AC_MSG_RESULT([no]); POSTGRESQL_LIB="no"]) 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 @@ -699,6 +889,37 @@ AC_SUBST(POSTGRESQL_SUPPORT) AC_SUBST(libPgSQLinc) AC_SUBST(libPgSQLlib) +# with_postgresql : check [pas défini], yes [uniquement --with], +# no [--without], valeur [--with=valeur]. +AC_ARG_WITH(bourne_shell, +[ --with-bourne-shell=PATH specify path for OS/2 bourne shell], +[], [with_bourne_shell=no]) + +if test "x$with_bourne_shell" = xyes; then + AC_MSG_ERROR([You have to specify a valide shell path !]) +fi + +if test "x$with_bourne_shell" = xno; then + if test $(uname) = "OS/2"; then + AC_MSG_ERROR([With OS/2 or eComstation, you have to specify a valide shell path !]) + fi + + BSH_PATH= +else + if test ! -x $with_bourne_shell; then + AC_MSG_ERROR([$with_bourne_shell is not executable !]) + fi + + if test $(uname) = "OS/2"; then + with_os2_bourne_shell=$(echo $with_bourne_shell | \ + sed -e '1,$s/\//\\\\\\\\/g') + BSH_PATH=-DBOURNE_SHELL=\"\\\"$with_os2_bourne_shell\\\"\" + else + AC_MSG_WARN([--with-bourne-shell ignored]) + BSH_PATH= + fi +fi + dnl Checks for sizes AC_CHECK_SIZEOF(void *, 4) AC_CHECK_SIZEOF(char, 1) @@ -745,32 +966,25 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \ 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/$READLINE) -AC_CONFIG_SUBDIRS(tools/$GSL) -AC_CONFIG_SUBDIRS(tools/$GPP) -AC_CONFIG_SUBDIRS(tools/$FILE) -AC_CONFIG_SUBDIRS(tools/$ICONV) -AC_CONFIG_SUBDIRS(tools/$SQLITE) -AC_CONFIG_SUBDIRS(tools/$UNITS) - dnl Check for OpenSSL os/comp AC_ARG_WITH(openssl_arch, [ --with-openssl-arch=ARCH specify os and compiler for openssl (ARCH or list)], [], [with_openssl_arch=none]) -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]) +if test $(uname) = "OS/2"; then + bash -c "cd tools/$OPENSSL && os2/OS2-EMX.cmd" else - (cd tools/$OPENSSL && ./Configure $with_openssl_arch) + if test "x$with_openssl_arch" = xnone; then + (cd tools/$OPENSSL && ./config no-asm) + 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 no-asm $with_openssl_arch) + fi fi if test "$MYGNUPLOT" = "yes"; then @@ -786,6 +1000,9 @@ fi AC_SUBST(GNUPLOT_COMPILATION) +HOST=$host +AC_SUBST(HOST) + case $host_cpu in i?86) @@ -838,39 +1055,144 @@ AC_SUBST(OS) DATE_FR=$(env LC_ALL=fr_FR date +'%A %x, %X %Z') DATE=$(env LC_ALL=C date +'%A %x, %X %Z') +MALLOC= case $OS in Darwin) - EXPORT_DYNAMIC=-flat_namespace + EXPORT_DYNAMIC=-Wl,-flat_namespace NESTED_FUNCTIONS=-fnested-functions - SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING" + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= break ;; - Cygwin) - EXPORT_DYNAMIC=--export-all-symbols + Cygwin) + EXPORT_DYNAMIC=-Wl,--export-all-symbols NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= break ;; - AIX) - EXPORT_DYNAMIC=--export-dynamic + Interix) + EXPORT_DYNAMIC=-Wl,--export-all-symbols + NESTED_FUNCTIONS= + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= + break;; + + AIX) + EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= + break ;; + + OS/2) + if test $FORCED_FINAL_ENCODING -eq 0; then \ + FINAL_ENCODING=CP850; \ + fi; + OS=OS2 + NESTED_FUNCTIONS= + EXPORT_DYNAMIC=-Zmap + ac_configure_args="$ac_configure_args --without-readline \ + --without-cairo --disable-shared --enable-static \ + --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD= + ELF= + break;; + + OpenBSD) + if test $FORCED_FINAL_ENCODING -eq 0; then \ + FINAL_ENCODING=UTF-8; \ + fi; + EXPORT_DYNAMIC=-Wl,--export-dynamic + NESTED_FUNCTIONS= + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= + break;; + + SunOS) + EXPORT_DYNAMIC=-Wl,--export-dynamic + NESTED_FUNCTIONS= + + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + MALLOC=-lumem + ELF= + break ;; + + NetBSD) + EXPORT_DYNAMIC=-Wl,--export-dynamic + NESTED_FUNCTIONS= + + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + GCCBIN=`which gcc` + GCCLIB=`dirname $GCCBIN`/../lib + ELF="-Wl,-R/usr/pkg/lib -Wl,-R$GCCLIB" break ;; *) - EXPORT_DYNAMIC=--export-dynamic + EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES + + ac_configure_args="$ac_configure_args --with-readline=builtin \ + --disable-shared --enable-static --enable-threads \ + CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ + FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \ + LDFLAGS=\"$LDFLAGS\"" + C_STANDARD=-std=gnu99 + ELF= break ;; esac +AC_SUBST(C_STANDARD) AC_SUBST(EXPORT_DYNAMIC) AC_SUBST(NESTED_FUNCTIONS) AC_SUBST(SEMAPHORES_NOMMES) +AC_SUBST(IPCS_SYSV) +AC_SUBST(SEMUN) +AC_SUBST(IPV6) +AC_SUBST(BSH_PATH) +AC_SUBST(ELF) AC_SUBST(NCURSES) AC_SUBST(READLINE) @@ -882,15 +1204,39 @@ AC_SUBST(FILE) AC_SUBST(ICONV) AC_SUBST(SQLITE) AC_SUBST(OPENSSL) +AC_SUBST(LIBXPM) +AC_SUBST(OPENMOTIF) +AC_SUBST(BUILD_OPENMOTIF) +AC_SUBST(SIGSEGV) AC_SUBST(FINAL_ENCODING) AC_SUBST(DATE) AC_SUBST(DATE_FR) +AC_SUBST(EXT_SQL) AC_SUBST(MALLOC) +AC_SUBST(GMP) +AC_SUBST(MPFR) +AC_SUBST(NTL) +AC_SUBST(COCOA) +AC_SUBST(PARI) +AC_SUBST(GIAC) +AC_SUBST(INCMOTIF) +AC_SUBST(LIBMOTIF) AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(FFLAGS) AC_SUBST(FCFLAGS) +AC_SUBST(LDFLAGS) + +AC_CONFIG_SUBDIRS(tools/$NCURSES) +AC_CONFIG_SUBDIRS(tools/$READLINE) +AC_CONFIG_SUBDIRS(tools/$GSL) +AC_CONFIG_SUBDIRS(tools/$GPP) +AC_CONFIG_SUBDIRS(tools/$FILE) +AC_CONFIG_SUBDIRS(tools/$ICONV) +AC_CONFIG_SUBDIRS(tools/$SQLITE) +AC_CONFIG_SUBDIRS(tools/$UNITS) +AC_CONFIG_SUBDIRS(tools/$SIGSEGV) AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(COPYING) @@ -906,9 +1252,10 @@ AC_CONFIG_FILES(scripts/rpllink) AC_CONFIG_FILES(rpltags/Makefile) AC_CONFIG_FILES(rpliconv/Makefile) AC_CONFIG_FILES(rplsums/Makefile) +AC_CONFIG_FILES(rplcas/Makefile) +AC_CONFIG_FILES(rplawk/Makefile) AC_CONFIG_FILES(lapack/lapack/Makefile) AC_CONFIG_FILES(lapack/blas/Makefile) -AC_CONFIG_FILES(ptmalloc3/Makefile) AC_CONFIG_FILES(man/rpl.1) AC_CONFIG_FILES(man/rplcc.1)