--- rpl/configure.ac 2013/10/15 13:19:38 1.80 +++ rpl/configure.ac 2016/04/01 10:14:20 1.155 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rpl],[4.1.16]) +AC_INIT([rpl],[4.1.25]) AC_CANONICAL_TARGET AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(silent-rules) @@ -8,27 +8,28 @@ AC_SUBST(target_cpu) AC_CONFIG_HEADERS([rplconfig.h]) dnl Libraries -NCURSES=ncurses-5.9 -READLINE=readline-6.2 -UNITS=units-2.01 -GSL=gsl-1.16 +NCURSES=ncurses-6.0 +READLINE=readline-6.3 +UNITS=units-2.12 +GSL=gsl-2.1 GPP=gpp-3.0 -GNUPLOT=gnuplot-4.6.3 -FILE=file-5.11 +GNUPLOT=gnuplot-5.0.1 +FILE=file-5.25 ICONV=libiconv-1.14 -SQLITE=sqlite-3.8.0.2 -OPENSSL=openssl-1.0.1e +SQLITE=sqlite-3.12.0 +OPENSSL=openssl-1.0.2g OPENMOTIF=openmotif-2.3.4 -LIBXPM=libXpm-3.5.9 +LIBXPM=libXpm-3.5.11 SIGSEGV=libsigsegv-2.11 -ZLIB=zlib-1.2.7 +ZLIB=zlib-1.2.8 -GMP=gmp-5.1.2 -MPFR=mpfr-3.1.2 +GMP=gmp-6.1.0 +MPFR=mpfr-3.1.4 +MPFI=mpfi-1.5.1 NTL=ntl-5.5.2 COCOA=CoCoALib-0.9950 PARI=pari-2.5.4 -GIAC=giac-1.1.0 +GIAC=giac-1.2.2 dnl 32 bits ABI AC_ARG_WITH(gcc_version, @@ -44,6 +45,7 @@ AC_SUBST(F77) ],[]) dnl Checks for Bash +BASH_PATH=$(which bash) BASH=$(which bash | sed 's/\//\\\//g') if test x$BASH = x; then @@ -51,6 +53,7 @@ if test x$BASH = x; then fi AC_SUBST(BASH) +AC_SUBST(BASH_PATH) dnl Checks for C compiler AC_PROG_CC(gcc) @@ -76,11 +79,11 @@ AC_PROG_F77(gfortran) dnl Check for Fortran 9* compiler AC_PROG_FC(gfortran) -if test x"$F77" == x; then +if test x"$F77" = x; then AC_MSG_ERROR([Cannot find gfortran! You have to install it.]) fi -if test x"$FC" == x; then +if test x"$FC" = x; then AC_MSG_ERROR([Cannot find gfortran! You have to install it.]) fi @@ -155,6 +158,20 @@ fi],[ ] ) +AC_ARG_ENABLE(native, +[ --enable-native enable gcc native compiler option (default=no)],[ +if test "$enableval" = "yes"; then + CFLAGS="$CFLAGS -mtune=native -march=native" + FFLAGS="$FFLAGS -mtune=native -march=native" + CXXFLAGS="$CXXFLAGS -mtune=native -march=native" + FCFLAGS="$FCFLAGS -mtune=native -march=native" +else + NATIVE= +fi],[ + NATIVE= + ] +) + AC_ARG_WITH(rpltools, [ --with-rpltools specify rpltools path used for cross compilation],[ if test "$with_rpltools" = "no" -o "$with_rpltools" = "yes"; then @@ -174,18 +191,23 @@ AC_ARG_ENABLE(rplcas, if test "$enableval" = "no"; then RPLCAS=-URPLCAS LIBRPLCAS= + INCRPLCAS= else RPLCAS=-DRPLCAS LIBRPLCAS=\$\(top_builddir\)/rplcas/lib/librplcas.a + INCRPLCAS="-I\$(top_builddir)/rplcas/include/giac \ + -I\$(top_builddir)/rplcas/include" fi],[ RPLCAS=-URPLCAS LIBRPLCAS= + INCRPLCAS= ] ) AC_SUBST(ABI) AC_SUBST(RPLCAS) AC_SUBST(LIBRPLCAS) +AC_SUBST(INCRPLCAS) dnl Options AC_ARG_ENABLE(optimization, @@ -196,18 +218,20 @@ if test "$enableval" = "no"; then 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" + CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" + FFLAGS="$FFLAGS $ABI $OPTIMISATION_F" + CXXFLAGS="$CXXFLAGS $ABI $OPTIMISATION_CXX" + FCFLAGS="$FCFLAGS $ABI $OPTIMISATION_F" fi],[ - CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" + CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" FFLAGS="$FFLAGS $ABI $OPTIMISATION_F" CXXFLAGS="$CXXFLAGS $ABI $OPTIMISATION_CXX" FCFLAGS="$FCFLAGS $ABI $OPTIMISATION_F" ] ) +CFLAGS="$CFLAGS -fno-strict-overflow" + AC_MSG_CHECKING([for usable shared memory]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include @@ -218,26 +242,12 @@ AC_COMPILE_IFELSE( ) AC_SUBST(SHARED_MEMORY) -AC_MSG_CHECKING([for pselect]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include - #include - #include - #include - ], - [ - struct timespec tv; - fd_set s1, s2, s3; - tv.tv_sec=1; - tv.tv_nsec=0; - FD_SET(1, &s1); FD_SET(2, &s2); FD_SET(3, &s3); - pselect(5, &s1, &s2, &s3, &tv, NULL); - return(0); - ])], -[PSELECT=-DPSELECT; AC_MSG_RESULT(yes)], -[PSELECT=-UPSELECT; AC_MSG_RESULT(no)] - ) -AC_SUBST(PSELECT) +AC_C_INLINE + +if test "$ac_cv_c_inline" != no ; then + AC_DEFINE(HAVE_INLINE,1,[inline keywork or macro available]) + AC_SUBST(HAVE_INLINE) +fi AC_ARG_ENABLE(sysv-ipcs, [ --enable-sysv-ipcs use SystemV IPC functions [[default=guessed]]], [ @@ -248,9 +258,9 @@ else IPCS_SYSV=-DIPCS_SYSV POSIX_IPCS=yes fi], -REG=$LDFLAGS +REG=$LIBS POSIX_IPCS=guessed -LDFLAGS="-lrt -lpthread" +LIBS="-lrt -lpthread" [AC_MSG_CHECKING([for POSIX semaphores and shared objects]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include @@ -269,12 +279,12 @@ fd = shm_open(sem , O_CREAT | O_RDWR, S_ [IPCS_SYSV=-UIPCS_SYSV; AC_MSG_RESULT(yes)], [IPCS_SYSV=-DIPCS_SYSV; AC_MSG_RESULT(no)] )] -LDFLAGS=$REG +LIBS=$REG ) if test "$IPCS_SYSV" = "-UIPCS_SYSV" -a "$POSIX_IPCS" = "guessed"; then -REG=$LDFLAGS -LDFLAGS=-pthread +REG=$LIBS +LIBS=-pthread AC_MSG_CHECKING([for POSIX anonymous semaphores]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include @@ -287,7 +297,7 @@ AC_LINK_IFELSE( [SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES; AC_MSG_RESULT(yes)], [SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES; AC_MSG_RESULT(no)] ) -LDFLAGS=$REG +LDFLAGS=$LIBS REG="" else SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES @@ -376,7 +386,7 @@ if test "$enableval" = "no"; then else MOTIF_SUPPORT="-DMOTIF_SUPPORT" fi], -if test "$have_x" == "yes"; then +if test "$have_x" = "yes"; then MOTIF_SUPPORT="-DMOTIF_SUPPORT" else MOTIF_SUPPORT="-UMOTIF_SUPPORT" @@ -444,7 +454,8 @@ if test ! -d "$srcdir"/tools/$NCURSES; t do echo Applying script $i && chmod 775 $i && ./$i; done; for i in ../$NCURSES*.patch.gz; - do echo Applying patch $i && gunzip -c $i | patch -p1; + do echo Applying patch $i && \ + gunzip -c $i | patch -p1; done); fi if test ! -d "$srcdir"/tools/$READLINE; then @@ -516,6 +527,10 @@ if test ! -d "$srcdir"/rplcas/$MPFR; the gunzip -c "$srcdir"/rplcas/$MPFR.tar.gz | \ (cd "$srcdir/rplcas" && tar -xf -) fi +if test ! -d "$srcdir"/rplcas/$MPFI; then + gunzip -c "$srcdir"/rplcas/$MPFI.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 -) @@ -682,8 +697,10 @@ AC_SUBST(libX) AC_SUBST(includeX) dnl Date -DATE=$(LANG=C date +"%A, %e %B %Y %T %z") +DATE=$(env LC_ALL=C date +"%A, %e %B %Y %T %z") +DATE_FR=$(env LC_ALL=fr_FR date +"%A, %e %B %Y %T %z") AC_SUBST(DATE) +AC_SUBST(DATE_FR) dnl Checks for libraries AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !])) @@ -805,7 +822,7 @@ if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPP if test $STATIC = no; then LIBS="$LIBS -L/$libMySQLlib -lmysqlclient_r $libMySQLinc" else - LIBS="$LIBS $libMySQLlib/libmysqlclient_r.a -lz $libMySQLinc" + LIBS="$LIBS $libMySQLlib/libmysqlclient_r.a $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; @@ -1157,7 +1174,6 @@ esac AC_SUBST(OS) -DATE=$(env LC_ALL=C date +'%A %x, %X %Z') MALLOC= case $OS in @@ -1287,6 +1303,12 @@ case $OS in break ;; esac +dnl Correction d'un problème de compilation pour GNUplot 5.0.0 +ac_configure_args="$ac_configure_args --disable-wxwidgets" +dnl Correction d'un problème d'ABI avec readline +ac_configure_args="$ac_configure_args \ + --with-abi-version=5.9 --with-rel-version=5.9" + case $OS in OS2) WHOLE_LIB1="" @@ -1359,6 +1381,7 @@ AC_SUBST(EXT_SQL) AC_SUBST(MALLOC) AC_SUBST(GMP) AC_SUBST(MPFR) +AC_SUBST(MPFI) AC_SUBST(NTL) AC_SUBST(COCOA) AC_SUBST(PARI)