Annotation of rpl/configure.ac, revision 1.204

1.1       bertrand    1: dnl Process this file with autoconf to produce a configure script.
1.200     bertrand    2: AC_INIT([rpl],[4.1.28])
1.1       bertrand    3: AC_CANONICAL_TARGET
                      4: AC_CANONICAL_TARGET
1.8       bertrand    5: AM_INIT_AUTOMAKE(silent-rules)
1.9       bertrand    6: AM_SILENT_RULES([yes])
1.1       bertrand    7: AC_SUBST(target_cpu)
                      8: AC_CONFIG_HEADERS([rplconfig.h])
                      9: 
                     10: dnl Libraries
1.127     bertrand   11: NCURSES=ncurses-6.0
1.172     bertrand   12: READLINE=readline-7.0
1.193     bertrand   13: UNITS=units-2.14
1.188     bertrand   14: GSL=gsl-2.4
1.1       bertrand   15: GPP=gpp-3.0
1.190     bertrand   16: GNUPLOT=gnuplot-5.0.6
1.192     bertrand   17: FILE=file-5.31
1.193     bertrand   18: ICONV=libiconv-1.15
1.189     bertrand   19: SQLITE=sqlite-3.19.3
1.186     bertrand   20: OPENSSL=openssl-1.1.0f
                     21: OPENMOTIF=openmotif-2.3.7
1.199     bertrand   22: LIBXPM=libXpm-3.5.12
1.31      bertrand   23: SIGSEGV=libsigsegv-2.11
1.113     bertrand   24: ZLIB=zlib-1.2.8
1.1       bertrand   25: 
1.193     bertrand   26: GMP=gmp-6.1.2
1.168     bertrand   27: MPFR=mpfr-3.1.5
1.137     bertrand   28: MPFI=mpfi-1.5.1
1.165     bertrand   29: NTL=ntl-9.11.0
1.166     bertrand   30: COCOA=CoCoALib-0.99542
1.163     bertrand   31: PARI=pari-2.7.6
1.137     bertrand   32: GIAC=giac-1.2.2
1.1       bertrand   33: 
1.33      bertrand   34: dnl 32 bits ABI
                     35: AC_ARG_WITH(gcc_version,
                     36: [  --with-gcc-version      force gcc version],[
                     37: CC=gcc-$with_gcc_version
                     38: CXX=g++-$with_gcc_version
                     39: CF=gfortran-$with_gcc_version
                     40: F77=gfortran-$with_gcc_version
1.43      bertrand   41: AC_SUBST(CC)
                     42: AC_SUBST(CXX)
                     43: AC_SUBST(CF)
                     44: AC_SUBST(F77)
1.33      bertrand   45: ],[])
                     46: 
1.37      bertrand   47: dnl Checks for Bash
1.100     bertrand   48: BASH_PATH=$(which bash)
1.37      bertrand   49: BASH=$(which bash | sed 's/\//\\\//g')
                     50: 
                     51: if test x$BASH = x; then
                     52:    AC_MSG_ERROR([Cannot find bash! You have to install it.])
                     53: fi
                     54: 
                     55: AC_SUBST(BASH)
1.100     bertrand   56: AC_SUBST(BASH_PATH)
1.37      bertrand   57: 
1.1       bertrand   58: dnl Checks for C compiler
                     59: AC_PROG_CC(gcc)
                     60: 
                     61: EXT_SQL=
                     62: 
                     63: AM_PROG_CC_C_O
                     64: 
                     65: if test "$GCC" != yes; then
                     66:    AC_MSG_ERROR([Cannot find gcc! You have to install it.])
                     67: fi
                     68: 
                     69: dnl Checks for C++ compiler
                     70: AC_PROG_CXX(g++)
                     71: 
1.2       bertrand   72: if test "$GXX" != yes; then
1.1       bertrand   73:    AC_MSG_ERROR([Cannot find g++! You have to install it.])
                     74: fi
                     75: 
                     76: dnl Checks for Fortran 77 compiler
                     77: AC_PROG_F77(gfortran)
                     78: 
1.3       bertrand   79: dnl Check for Fortran 9* compiler
                     80: AC_PROG_FC(gfortran)
                     81: 
1.92      bertrand   82: if test x"$F77" = x; then
1.1       bertrand   83:    AC_MSG_ERROR([Cannot find gfortran! You have to install it.])
                     84: fi
                     85: 
1.92      bertrand   86: if test x"$FC" = x; then
1.1       bertrand   87:    AC_MSG_ERROR([Cannot find gfortran! You have to install it.])
                     88: fi
                     89: 
1.33      bertrand   90: OPTIMISATION_C=-O3
                     91: OPTIMISATION_CXX=-O3
                     92: OPTIMISATION_F=-O3
1.1       bertrand   93: 
                     94: dnl X paths
                     95: AC_PATH_X
                     96: AC_PATH_XTRA
                     97: 
                     98: if test "$ac_x_includes" != "no"; then
                     99:    if test x"$ac_x_includes" != x; then
                    100:        X_CFLAGS="$X_CFLAGS -I$ac_x_includes"
                    101:        includeX="-I$ac_x_includes"
                    102:    fi
                    103: fi
                    104: if test "$ac_x_libraries" != "no"; then
                    105:    if test x"$ac_x_libraries" != x; then
                    106:        X_LIBS="$X_LIBS -L$ac_x_libraries"
                    107:    fi
                    108: fi
                    109: 
                    110: dnl 32 bits ABI
                    111: AC_ARG_WITH(32bits-abi,
                    112: [  --with-32bits-abi       force 32bits ABI (multilib)],[
1.23      bertrand  113: if test "$with_32bits_abi" = "no"; then
1.1       bertrand  114:    ABI=
                    115: else
                    116:    ABI=-m32
                    117: fi],[
                    118:    ABI=
                    119:    ]
                    120: )
                    121: 
                    122: if test x$ABI = x; then
                    123: AC_ARG_WITH(64bits-abi,
                    124: [  --with-64bits-abi       force 64bits ABI (multilib)],[
1.23      bertrand  125: if test "$with_64bits_abi" = "no"; then
1.1       bertrand  126:    ABI=
                    127: else
                    128:    ABI=-m64
                    129: fi],[
                    130:    ABI=
                    131:    ]
                    132: )
                    133: fi
                    134: 
                    135: LDFLAGS="$LDFLAGS $ABI"
                    136: 
1.23      bertrand  137: AC_ARG_WITH(sysroot,
                    138: [  --with-sysroot          sysroot for cross compilation],[
                    139: if test "$with_sysroot" = "no" -o "$with_rpltools" = "yes"; then
                    140:    AC_MSG_ERROR([You have to specify sysroot path !])
                    141: else
1.24      bertrand  142:    SYSROOT="-I$with_sysroot/usr/include"
1.25      bertrand  143:    SYSROOT2=$with_sysroot
1.23      bertrand  144: fi],[
                    145:    SYSROOT=
1.25      bertrand  146:    SYSROOT2=
1.23      bertrand  147:    ]
                    148: )
                    149: 
1.6       bertrand  150: AC_ARG_ENABLE(recursive,
                    151: [  --enable-recursive      recursive configuration (default=yes)],[
                    152: if test "$enableval" = "yes"; then
                    153:    RECURSIVE=yes
                    154: else
                    155:    RECURSIVE=no
                    156: fi],[
                    157:    RECURSIVE=yes
                    158:    ]
                    159: )
                    160: 
1.141     bertrand  161: AC_ARG_ENABLE(native,
                    162: [  --enable-native         enable gcc native compiler option (default=no)],[
                    163: if test "$enableval" = "yes"; then
                    164:    CFLAGS="$CFLAGS -mtune=native -march=native"
                    165:    FFLAGS="$FFLAGS -mtune=native -march=native"
                    166:    CXXFLAGS="$CXXFLAGS -mtune=native -march=native"
                    167:    FCFLAGS="$FCFLAGS -mtune=native -march=native"
                    168: else
                    169:    NATIVE=
                    170: fi],[
                    171:    NATIVE=
                    172:    ]
                    173: )
                    174: 
1.3       bertrand  175: AC_ARG_WITH(rpltools,
                    176: [  --with-rpltools         specify rpltools path used for cross compilation],[
1.23      bertrand  177: if test "$with_rpltools" = "no" -o "$with_rpltools" = "yes"; then
1.3       bertrand  178:    AC_MSG_ERROR([You have to specify rpltools path !])
                    179: else
                    180:    RPLTOOLS=$with_rpltools
                    181: fi],[
                    182:    RPLTOOLS=\$\(top_builddir\)
                    183:    ]
                    184: )
                    185: 
                    186: AC_SUBST(RPLTOOLS)
                    187: 
1.1       bertrand  188: dnl RPL/CAS support
1.3       bertrand  189: AC_ARG_ENABLE(rplcas,
                    190: [  --enable-rplcas         compile rplcas (default=no)],[
                    191: if test "$enableval" = "no"; then
1.1       bertrand  192:    RPLCAS=-URPLCAS
                    193:    LIBRPLCAS=
1.95      bertrand  194:    INCRPLCAS=
1.1       bertrand  195: else
                    196:    RPLCAS=-DRPLCAS
                    197:    LIBRPLCAS=\$\(top_builddir\)/rplcas/lib/librplcas.a
1.95      bertrand  198:    INCRPLCAS="-I\$(top_builddir)/rplcas/include/giac \
                    199:            -I\$(top_builddir)/rplcas/include"
1.1       bertrand  200: fi],[
                    201:    RPLCAS=-URPLCAS
                    202:    LIBRPLCAS=
1.95      bertrand  203:    INCRPLCAS=
1.1       bertrand  204:    ]
                    205: )
                    206: 
                    207: AC_SUBST(ABI)
                    208: AC_SUBST(RPLCAS)
                    209: AC_SUBST(LIBRPLCAS)
1.95      bertrand  210: AC_SUBST(INCRPLCAS)
1.1       bertrand  211: 
                    212: dnl Options
                    213: AC_ARG_ENABLE(optimization,
1.187     bertrand  214: [  --enable-optimization   set compiler flags [[default=environment variables -O2, enable=environment variables -O3]]], [
1.1       bertrand  215: if test "$enableval" = "no"; then
                    216:    CFLAGS=$ABI
                    217:    FFLAGS=$ABI
                    218:    CXXFLAGS=$ABI
                    219:    FCFLAGS=$ABI
                    220: else
1.141     bertrand  221:    CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" 
                    222:    FFLAGS="$FFLAGS $ABI $OPTIMISATION_F"
                    223:    CXXFLAGS="$CXXFLAGS $ABI $OPTIMISATION_CXX"
                    224:    FCFLAGS="$FCFLAGS $ABI $OPTIMISATION_F"
1.1       bertrand  225: fi],[
1.187     bertrand  226:    CFLAGS="$CFLAGS $ABI -O2" 
                    227:    FFLAGS="$FFLAGS $ABI -O2"
                    228:    CXXFLAGS="$CXXFLAGS $ABI -O2"
                    229:    FCFLAGS="$FCFLAGS $ABI -O2"
1.1       bertrand  230:    ]
                    231: )
                    232: 
1.93      bertrand  233: CFLAGS="$CFLAGS -fno-strict-overflow"
                    234: 
1.6       bertrand  235: AC_MSG_CHECKING([for usable shared memory])
                    236: AC_COMPILE_IFELSE(
                    237:    [AC_LANG_PROGRAM([#include <sys/shm.h>
                    238:     ],
                    239:    [ return(0); ])],
                    240: [SHARED_MEMORY=-DSHARED_MEMORY; AC_MSG_RESULT(yes)],
                    241: [SHARED_MEMORY=-USHARED_MEMORY; AC_MSG_RESULT(no)]
                    242:    )
                    243: AC_SUBST(SHARED_MEMORY)
                    244: 
1.116     bertrand  245: AC_C_INLINE
                    246: 
                    247: if test "$ac_cv_c_inline" != no ; then
                    248:    AC_DEFINE(HAVE_INLINE,1,[inline keywork or macro available])
                    249:     AC_SUBST(HAVE_INLINE)
                    250: fi
                    251: 
1.2       bertrand  252: AC_ARG_ENABLE(sysv-ipcs,
1.1       bertrand  253: [  --enable-sysv-ipcs      use SystemV IPC functions [[default=guessed]]], [
                    254: if test "$enableval" = "no"; then
1.3       bertrand  255:    IPCS_SYSV=-UIPCS_SYSV
                    256:    POSIX_IPCS=no
1.1       bertrand  257: else
1.3       bertrand  258:    IPCS_SYSV=-DIPCS_SYSV
                    259:    POSIX_IPCS=yes
1.1       bertrand  260: fi],
1.91      bertrand  261: REG=$LIBS
1.3       bertrand  262: POSIX_IPCS=guessed
1.91      bertrand  263: LIBS="-lrt -lpthread"
1.1       bertrand  264: [AC_MSG_CHECKING([for POSIX semaphores and shared objects])
1.23      bertrand  265: AC_LINK_IFELSE(
1.1       bertrand  266: [AC_LANG_PROGRAM([#include <sys/mman.h>
                    267: #include <sys/stat.h>
                    268: #include <fcntl.h>
                    269:  ],
                    270: [ int fd; char *sem = "/test";
                    271: fd = shm_open(sem , O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
                    272:   close(fd);
                    273:   shm_unlink(sem);
                    274:   fd = sem_open(sem, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
                    275:   close(fd);
                    276:   sem_unlink(sem);
                    277:   return(0);
                    278: ])],
                    279: [IPCS_SYSV=-UIPCS_SYSV; AC_MSG_RESULT(yes)],
                    280: [IPCS_SYSV=-DIPCS_SYSV; AC_MSG_RESULT(no)]
                    281:    )]
1.91      bertrand  282: LIBS=$REG
1.1       bertrand  283: )
                    284: 
1.3       bertrand  285: if test "$IPCS_SYSV" = "-UIPCS_SYSV" -a "$POSIX_IPCS" = "guessed"; then
1.91      bertrand  286: REG=$LIBS
                    287: LIBS=-pthread
1.1       bertrand  288: AC_MSG_CHECKING([for POSIX anonymous semaphores])
1.23      bertrand  289: AC_LINK_IFELSE(
1.1       bertrand  290: [AC_LANG_PROGRAM([#include <semaphore.h>
                    291:  ],
                    292: [ sem_t sem;
                    293:  if (sem_init(&sem, 1, 0) != 0) return(1);
                    294:  sem_destroy(&sem);
                    295:   return(0);
                    296: ])],
                    297: [SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES; AC_MSG_RESULT(yes)],
                    298: [SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES; AC_MSG_RESULT(no)]
                    299:    )
1.91      bertrand  300: LDFLAGS=$LIBS
1.1       bertrand  301: REG=""
                    302: else
                    303:    SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES
                    304: fi
                    305: 
                    306: AC_ARG_ENABLE(full-static,
                    307: [  --enable-full-static    build static RPL/2 engine [[default=shared]]], [
                    308: if test "$enableval" = "no"; then
                    309:    STATIC=no
                    310: else
                    311:    STATIC=yes
                    312: fi],
                    313: STATIC=no)
                    314: 
                    315: AC_ARG_ENABLE(final-encoding,
                    316: [  --enable-final-encoding force final encoding [[default=guessed]]], [
                    317: if test "$enableval" = "no"; then
                    318:    FINAL_ENCODING="\$(shell locale charmap | \
                    319:        \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')"
                    320:    FORCED_FINAL_ENCODING=0
                    321: else
                    322:    FINAL_ENCODING="$enable_final_encoding"
                    323:    FORCED_FINAL_ENCODING=1
                    324: fi], [
                    325: FORCED_FINAL_ENCODING=0
                    326: FINAL_ENCODING="\$(shell locale charmap | \
                    327:    \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')"])
                    328: 
                    329: AC_ARG_ENABLE(tex,
                    330: [  --enable-tex            provide the TeX support [[default=guessed]]], [
                    331: if test "$enableval" = "no"; then
                    332:    TEX_SUPPORT=no
                    333: else
                    334:    TEX_SUPPORT=yes
                    335: fi],
                    336: TEX_SUPPORT=guessed)
                    337: 
                    338: AC_ARG_ENABLE(vim,
                    339: [  --enable-vim            provide the vim support [[default=guessed]]], [
                    340: if test "$enableval" = "no"; then
                    341:    VIM_SUPPORT=no
1.16      bertrand  342:    DEBVIM=
1.1       bertrand  343: else
                    344:    VIM_SUPPORT=yes
1.17      bertrand  345:    DEBVIM=", vim"
1.1       bertrand  346: fi],
                    347: VIM_SUPPORT=guessed)
                    348: 
                    349: AC_ARG_ENABLE(embedded-gnuplot,
                    350: [  --enable-embedded-gnuplot build gnuplot provided by this package [[default=yes]]], [
                    351: if test "$enableval" = "no"; then
                    352:    MYGNUPLOT=no
                    353: else
                    354:    MYGNUPLOT=yes
                    355: fi], [
                    356: MYGNUPLOT=yes])
                    357: 
                    358: AC_ARG_ENABLE(gnuplot,
                    359: [  --enable-gnuplot        provide the GnuPlot support [[default=guessed]]],
                    360: [
                    361: if test "$enableval" = "no"; then
                    362:    GNUPLOT_SUPPORT=no
                    363:    MYGNUPLOT=no
                    364:    FORCE_GNUPLOT_PATH=-UFORCE_GNUPLOT_PATH
                    365: else
                    366:    GNUPLOT_SUPPORT=yes
                    367:    FORCE_GNUPLOT_PATH=-DFORCE_GNUPLOT_PATH
                    368: fi], [
                    369: if test "$MYGNUPLOT" = "yes"; then
                    370:    GNUPLOT_SUPPORT=yes
                    371:    FORCE_GNUPLOT_PATH=-DFORCE_GNUPLOT_PATH
                    372: else
                    373:    GNUPLOT_SUPPORT=guessed
                    374:    FORCE_GNUPLOT_PATH=-UFORCE_GNUPLOT_PATH
                    375: fi])
                    376: 
                    377: libX=""
                    378: LIBMOTIF=""
                    379: INCMOTIF=""
                    380: BUILD_OPENMOTIF=""
1.197     bertrand  381: MODULE_MOTIF=""
1.1       bertrand  382: 
                    383: AC_ARG_ENABLE(motif,
                    384: [  --enable-motif          provide the Motif support [[default=guessed]]], [
                    385: if test "$enableval" = "no"; then
                    386:    MOTIF_SUPPORT="-UMOTIF_SUPPORT"
                    387: else
                    388:    MOTIF_SUPPORT="-DMOTIF_SUPPORT"
                    389: fi],
1.92      bertrand  390: if test "$have_x" = "yes"; then
1.1       bertrand  391:    MOTIF_SUPPORT="-DMOTIF_SUPPORT"
                    392: else
                    393:    MOTIF_SUPPORT="-UMOTIF_SUPPORT"
                    394: fi)
                    395: 
                    396: if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then
1.201     bertrand  397:    libX="$X_LIBS -lXt -lX11 -lXext -lXinerama"
1.198     bertrand  398:    LIBMOTIF="\$(top_builddir)/tools/$OPENMOTIF/install/lib/libXm.a \
1.1       bertrand  399:            \$(top_builddir)/tools/$LIBXPM/src/.libs/libXpm.a"
                    400:    INCMOTIF="-I\$(top_srcdir)/tools/$OPENMOTIF/lib \
                    401:            -I\$(top_builddir)/tools/$OPENMOTIF/lib \
1.8       bertrand  402:            -I\$(top_srcdir)/tools/$LIBXPM/include"
1.1       bertrand  403:    BUILD_OPENMOTIF="$LIBXPM $OPENMOTIF"
1.6       bertrand  404: 
                    405:    if test $RECURSIVE = yes; then
                    406:        AC_CONFIG_SUBDIRS(tools/$LIBXPM)
                    407:        AC_CONFIG_SUBDIRS(tools/$OPENMOTIF)
                    408:    fi;
1.197     bertrand  409: 
                    410:    MODULE_MOTIF="modules/motif"
1.1       bertrand  411: fi
                    412: 
                    413: AC_ARG_ENABLE(experimental,
                    414: [  --enable-experimental   enable experimental code [[default=no]]], [
                    415: if test "$enableval" = "no"; then
                    416:    EXPERIMENTAL_CODE="-UEXPERIMENTAL_CODE"
                    417: else
                    418:    EXPERIMENTAL_CODE="-DEXPERIMENTAL_CODE"
                    419: fi],
                    420: EXPERIMENTAL_CODE="-UEXPERIMENTAL_CODE")
                    421: 
                    422: AC_ARG_ENABLE(debug,
                    423: [  --enable-debug          enable debug code [[default=no]]], [
                    424: if test "$enableval" = "no"; then
                    425:    DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS"
                    426: else
                    427:    DEBUG="-DDEBUG_MEMOIRE -UDEBUG_ERREURS"
                    428: fi], [DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS"])
                    429: 
                    430: AC_ARG_ENABLE(profile,
                    431: [  --enable-profile        enable profile code [[default=no]]], [
                    432: if test "$enableval" = "no"; then
                    433:    PROFILAGE=""
                    434: else
                    435:    PROFILAGE="-pg"
                    436: fi], [PROFILAGE=""])
                    437: 
                    438: AC_SUBST(PROFILAGE)
                    439: 
1.48      bertrand  440: dnl Checks for uuencode
                    441: AC_CHECK_PROG(UUENCODE, uuencode, yes, no)
                    442: if test "$UUENCODE" = no; then
                    443:    AC_MSG_ERROR([Can not find uuencode !])
                    444: fi
                    445: 
1.202     bertrand  446: dnl Checks for patch
                    447: AC_CHECK_PROG(PATCH, patch, yes, no)
                    448: if test "$PATCH" = no; then
                    449:    AC_MSG_ERROR([Can not find patch !])
                    450: fi
                    451: 
1.1       bertrand  452: if test ! -d tools; then
                    453:    mkdir tools
                    454: fi
                    455: if test ! -d "$srcdir"/tools/$NCURSES; then
                    456:    gunzip -c "$srcdir"/tools/$NCURSES.tar.gz | \
                    457:            (cd "$srcdir/tools" && tar -xf -)
                    458:    (cd "$srcdir/tools/"$NCURSES && \
1.191     bertrand  459:            for i in $(ls ../$NCURSES*.sh.gz);
                    460:            do echo Uncompressing script $i; TMP=$i; gunzip -c $i > ${TMP%.*};
1.13      bertrand  461:            done;
1.191     bertrand  462:            for i in $(ls ../$NCURSES*.sh);
1.24      bertrand  463:            do echo Applying script $i && chmod 775 $i && ./$i;
1.13      bertrand  464:            done;
1.191     bertrand  465:            for i in $(ls ../$NCURSES*.patch.gz);
1.98      bertrand  466:            do echo Applying patch $i && \
                    467:                gunzip -c $i | patch -p1;
1.1       bertrand  468:            done);
                    469: fi
                    470: if test ! -d "$srcdir"/tools/$READLINE; then
                    471:    gunzip -c "$srcdir"/tools/$READLINE.tar.gz | \
                    472:            (cd "$srcdir/tools" && tar -xf -)
                    473: fi
                    474: if test ! -d "$srcdir"/tools/$UNITS; then
                    475:    gunzip -c "$srcdir"/tools/$UNITS.tar.gz | \
                    476:            (cd "$srcdir/tools" && tar -xf -)
                    477: fi
                    478: if test ! -d "$srcdir"/tools/$GSL; then
                    479:    gunzip -c "$srcdir"/tools/$GSL.tar.gz | \
                    480:            (cd "$srcdir/tools" && tar -xf -)
                    481:    if test $(uname) = "OS/2"; then
                    482:        (cd "$srcdir"/tools/$GSL; \
                    483:                TMP=$(mktemp tmp.XXXXXXXXXX); \
                    484:                sed -e '1,$s/\${1+"\$@"}/"\$@"/g' ltmain.sh > $TMP; \
                    485:                \mv -f $TMP ltmain.sh)
                    486:    fi
                    487: fi
                    488: if test ! -d "$srcdir"/tools/$GPP; then
                    489:    gunzip -c "$srcdir"/tools/$GPP.tar.gz | \
                    490:            (cd "$srcdir/tools" && tar -xf -)
                    491: fi
                    492: if test ! -d "$srcdir"/tools/$FILE; then
                    493:    gunzip -c "$srcdir"/tools/$FILE.tar.gz | \
                    494:            (cd "$srcdir/tools" && tar -xf - )
1.23      bertrand  495:    (cd "$srcdir/tools"/$FILE && gunzip -c ../$FILE.diff.gz | patch -p1 && \
                    496:            autoreconf)
1.1       bertrand  497: fi
                    498: if test ! -d "$srcdir"/tools/$SQLITE; then
                    499:    gunzip -c "$srcdir"/tools/$SQLITE.tar.gz | \
                    500:            (cd "$srcdir/tools" && tar -xf -)
                    501: fi
                    502: if test ! -d "$srcdir"/tools/$SIGSEGV; then
                    503:    gunzip -c "$srcdir"/tools/$SIGSEGV.tar.gz | \
                    504:            (cd "$srcdir/tools" && tar -xf -)
1.32      bertrand  505:    (cd "$srcdir/tools/$SIGSEGV" && ./autogen.sh --skip-gnulib)
1.1       bertrand  506: fi
1.36      bertrand  507: if test ! -d "$srcdir"/tools/$ICONV; then
                    508:    gunzip -c "$srcdir"/tools/$ICONV.tar.gz | \
                    509:            (cd "$srcdir/tools" && tar -xf -)
1.38      bertrand  510:    (cd "$srcdir"/tools/$ICONV && ln -sf ../$SIGSEGV/gnulib gnulib)
1.36      bertrand  511: fi
1.1       bertrand  512: if test ! -d "$srcdir"/tools/$OPENMOTIF; then
                    513:    gunzip -c "$srcdir"/tools/$OPENMOTIF.tar.gz | \
                    514:            (cd "$srcdir/tools" && tar -xf -)
                    515: fi
                    516: if test ! -d "$srcdir"/tools/$LIBXPM; then
                    517:    gunzip -c "$srcdir"/tools/$LIBXPM.tar.gz | \
                    518:            (cd "$srcdir/tools" && tar -xf -)
                    519: fi
                    520: if test ! -d tools/$OPENSSL; then
                    521:    gunzip -c "$srcdir"/tools/$OPENSSL.tar.gz | \
                    522:            (cd tools && tar -xf -)
                    523: fi
1.62      bertrand  524: if test ! -d tools/$ZLIB; then
                    525:    gunzip -c "$srcdir"/tools/$ZLIB.tar.gz | \
                    526:            (cd tools && tar -xf - && cd $ZLIB && ./configure --static)
                    527: fi
1.1       bertrand  528: if test ! -d rplcas; then
                    529:    mkdir rplcas
                    530: fi
                    531: if test ! -d "$srcdir"/rplcas/$GMP; then
                    532:    gunzip -c "$srcdir"/rplcas/$GMP.tar.gz | \
                    533:            (cd "$srcdir/rplcas" && tar -xf -)
                    534: fi
                    535: if test ! -d "$srcdir"/rplcas/$MPFR; then
                    536:    gunzip -c "$srcdir"/rplcas/$MPFR.tar.gz | \
                    537:            (cd "$srcdir/rplcas" && tar -xf -)
                    538: fi
1.137     bertrand  539: if test ! -d "$srcdir"/rplcas/$MPFI; then
                    540:    gunzip -c "$srcdir"/rplcas/$MPFI.tar.gz | \
                    541:            (cd "$srcdir/rplcas" && tar -xf -)
                    542: fi
1.1       bertrand  543: if test ! -d rplcas/$NTL; then
                    544:    gunzip -c "$srcdir"/rplcas/$NTL.tar.gz | \
                    545:            (cd rplcas && tar -xf -)
                    546: fi
                    547: if test ! -d rplcas/$COCOA; then
                    548:    gunzip -c "$srcdir"/rplcas/$COCOA.tar.gz | \
                    549:            (cd rplcas && tar -xf -)
                    550: fi
                    551: if test ! -d rplcas/$PARI; then
                    552:    gunzip -c "$srcdir"/rplcas/$PARI.tar.gz | \
                    553:            (cd rplcas && tar -xf -)
                    554: fi
                    555: if test ! -d "$srcdir"/rplcas/$GIAC; then
                    556:    gunzip -c "$srcdir"/rplcas/$GIAC.tar.gz | \
                    557:            (cd "$srcdir/rplcas" && tar -xf -)
                    558: fi
                    559: 
                    560: touch tools/openmotif.lib
                    561: 
                    562: dnl Default installation directory
                    563: AC_PREFIX_DEFAULT(/usr/local)
                    564: 
                    565: dnl Set final install path
                    566: AC_ARG_ENABLE(final-run-path,
                    567:              [  --enable-final-run-path=PATH enable another final run path than PREFIX], [
                    568:    if test "x$enable_final_run_path" = "x"; then
                    569:        AC_MSG_NOTICE("No path with --enable-final-run-path.")
                    570:        AC_MSG_ERROR("You should specify final path !")
                    571:    else
                    572:        RUNPATH="$enable_final_run_path"
                    573:    fi
                    574: ],
                    575: RUNPATH="\${prefix}"
                    576: )
                    577: AC_SUBST(RUNPATH)
                    578: 
                    579: dnl Checks for programs
                    580: AC_PROG_INSTALL
                    581: AC_PROG_LN_S
                    582: AC_PROG_MAKE_SET
                    583: AC_PROG_RANLIB
                    584: 
                    585: dnl Checks for nawk
                    586: AC_CHECK_PROG(AWK, nawk, yes, no)
                    587: if test "$AWK" = no; then
                    588:    AC_CHECK_PROG(AWK, gawk, yes, no)
                    589:    if test "$AWK" = no; then
                    590:        AC_MSG_ERROR([Can not find nawk !])
                    591:    fi
                    592: fi
                    593: 
                    594: dnl Checks for sed
                    595: AC_CHECK_PROG(SED, sed, yes, no)
                    596: if test "$SED" = no; then
                    597:    AC_MSG_ERROR([Can not find sed !])
                    598: fi
                    599: 
1.48      bertrand  600: dnl Checks for yacc
                    601: AC_CHECK_PROG(YACC, yacc, yes, no)
                    602: if test "$YACC" = no; then
                    603:    AC_MSG_ERROR([Can not find yacc !])
                    604: fi
                    605: 
1.1       bertrand  606: dnl Checks for TeX, LaTeX, dvips, gs, gv, vim and gnuplot
                    607: if test "$TEX_SUPPORT" = guessed; then
                    608:    POSTSCRIPT_SUPPORT="-DPOSTSCRIPT_SUPPORT"
                    609: 
                    610:    AC_CHECK_PROG(TEX, tex, yes, no)
                    611:    if test "$TEX" = no; then
                    612:        AC_MSG_WARN([Cannot find TeX! You may install it.
                    613: Download at http://tex.loria.fr/
                    614: ])
                    615:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    616:    fi
                    617: 
                    618:    AC_CHECK_PROG(LATEX, latex, yes, no)
                    619:    if test "$LATEX" = no; then
                    620:        AC_MSG_WARN([Cannot find LaTeX! You may install it.
                    621: Download at http://tex.loria.fr/
                    622: ])
                    623:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    624:    fi
                    625: 
                    626:    AC_CHECK_PROG(DVIPS, dvips, yes, no)
                    627:    if test "$DVIPS" = no; then
                    628:        AC_MSG_WARN([Cannot find dvips! You may install it.
                    629: Download at http://tex.loria.fr/
                    630: ])
                    631:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    632:    fi
                    633: 
                    634:    AC_CHECK_PROG(GS, gs, yes, no)
                    635:    if test "$GS" = no; then
                    636:        AC_MSG_WARN([Cannot find gs! You may install it.
                    637: Download at http://ftp.lip6.fr/
                    638: ])
                    639:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    640:    fi
                    641: 
                    642:    AC_CHECK_PROG(GV, gv, yes, no)
                    643:    if test "$GV" = no; then
                    644:        AC_MSG_WARN([Cannot find gv! You may install it.
                    645: Download at http://ftp.lip6.fr/
                    646: ])
                    647:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    648:    fi
                    649: else
                    650:    if test "$TEX_SUPPORT" = no; then
                    651:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    652:    else
                    653:        POSTSCRIPT_SUPPORT="-DPOSTSCRIPT_SUPPORT"
                    654:    fi
                    655: fi
                    656: 
                    657: if test "$GNUPLOT_SUPPORT" = guessed; then
                    658:    AC_CHECK_PROG(GNUPLOT_P, gnuplot, yes, no)
                    659:    if test "$GNUPLOT_P" = no; then
                    660:        AC_MSG_WARN([Cannot find gnuplot! You may install it.
                    661: Download at http://www.gnuplot.vt.edu/
                    662: ])
                    663:        GNUPLOT_SUPPORT="-UGNUPLOT_SUPPORT"
                    664:    else
                    665:        GNUPLOT_SUPPORT="-DGNUPLOT_SUPPORT"
                    666:    fi
                    667: else
                    668:    if test "$GNUPLOT_SUPPORT" = no; then
                    669:        GNUPLOT_SUPPORT="-UGNUPLOT_SUPPORT"
                    670:    else
                    671:        GNUPLOT_SUPPORT="-DGNUPLOT_SUPPORT"
                    672:    fi
                    673: fi
                    674: 
                    675: if test "$VIM_SUPPORT" = guessed; then
                    676:    AC_CHECK_PROG(VIM, vim, yes, no)
                    677:    if test "$VIM" = no; then
                    678:        AC_MSG_WARN([Cannot find vim! You may install it.
                    679: Download at http://www.vim.org/
                    680: ])
                    681:        VIM_SUPPORT="-UVIM_SUPPORT"
1.16      bertrand  682:        DEBVIM=
1.1       bertrand  683:    else
                    684:        VIM_SUPPORT="-DVIM_SUPPORT"
1.18      bertrand  685:        DEBVIM=", vim"
1.1       bertrand  686:    fi
                    687: else
                    688:    if test "$VIM_SUPPORT" = no; then
                    689:        VIM_SUPPORT="-UVIM_SUPPORT"
1.16      bertrand  690:        DEBVIM=
1.1       bertrand  691:    else
                    692:        VIM_SUPPORT="-DVIM_SUPPORT"
1.18      bertrand  693:        DEBVIM=", vim"
1.1       bertrand  694:    fi
                    695: fi
                    696: 
                    697: dnl Substitutions
                    698: AC_SUBST(GNUPLOT_SUPPORT)
                    699: AC_SUBST(FORCE_GNUPLOT_PATH)
                    700: AC_SUBST(POSTSCRIPT_SUPPORT)
                    701: AC_SUBST(VIM_SUPPORT)
                    702: AC_SUBST(EXPERIMENTAL_CODE)
                    703: AC_SUBST(DEBUG)
                    704: AC_SUBST(MOTIF_SUPPORT)
                    705: AC_SUBST(libX)
                    706: AC_SUBST(includeX)
                    707: 
                    708: dnl Date
1.124     bertrand  709: DATE=$(env LC_ALL=C date +"%A, %e %B %Y %T %z")
                    710: DATE_FR=$(env LC_ALL=fr_FR date +"%A, %e %B %Y %T %z")
1.1       bertrand  711: AC_SUBST(DATE)
1.124     bertrand  712: AC_SUBST(DATE_FR)
1.1       bertrand  713: 
                    714: dnl Checks for libraries
                    715: AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !]))
1.2       bertrand  716: AC_CHECK_LIB(c, pthread_mutex_init,,
                    717:             [AC_CHECK_LIB(pthread, main,,
                    718:             AC_MSG_ERROR([Can not find libpthread !]))])
1.201     bertrand  719: if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then
                    720:    AC_CHECK_LIB(Xinerama, XineramaIsActive,,
                    721:                 AC_MSG_ERROR([Can not find libXinerama !]))
                    722: fi
1.203     bertrand  723: AC_CHECK_LIB(gomp, omp_get_num_procs,, AC_MSG_ERROR([Can not find libgomp !]))
1.204   ! bertrand  724: OPENMP=-lgomp
1.203     bertrand  725: AC_SUBST(OPENMP)
1.1       bertrand  726: 
                    727: dnl Check for union semun
                    728: AC_CHECK_TYPE([union semun], SEMUN=-DUNION_SEMUN, SEMUN=-UUNION_SEMUN, [[
                    729: #include <sys/sem.h>
                    730: ]])
                    731: 
                    732: dnl Check for IPv6 support
                    733: AC_CHECK_TYPE([struct sockaddr_in6], IPV6=-DIPV6, IPV6=-UIPV6, [[
                    734: #include <sys/types.h>
                    735: #include <netinet/in.h>
                    736: ]])
                    737: 
                    738: dnl Do we need to use -ldl?
                    739: if test "$CYGWIN" != yes; then
                    740:    AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl",
                    741:            AC_MSG_WARN([libdl doesn't seem to be needed on this system.]))
                    742: fi
                    743: 
                    744: dnl Do we need to use -lrt?
                    745: AC_CHECK_LIB(rt, nanosleep, LIBS="$LIBS -lrt",
                    746:        AC_MSG_WARN([librt doesn't seem to be needed on this system.]))
                    747: 
1.79      bertrand  748: AC_CHECK_LIB(rt, shm_open, LIBS="$LIBS -lrt",
                    749:        AC_MSG_WARN([librt doesn't seem to be needed on this system.]))
                    750: 
                    751: AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread",
                    752:        AC_MSG_WARN([libpthread doesn't seem to be needed on this system.]))
                    753: 
1.1       bertrand  754: dnl Do we need to use -lsocket?
                    755: AC_CHECK_LIB(socket, bind, LIBS="$LIBS -lsocket",
                    756:        AC_MSG_WARN([libsocket doesn't seem to be needed on this system.]))
                    757: 
                    758: dnl Check for SQL libraries
                    759: MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    760: AC_ARG_WITH(mysql,
                    761: [  --with-mysql=PATH         specify directory for installed mysql],
                    762: [], [with_mysql=check])
                    763: 
1.162     bertrand  764: if test "x$with_mysql" = xcheck -o "x$with_mysql" = xyes; then
1.1       bertrand  765:    libMySQLinc="-I/usr/include"
                    766:    libMySQLlib="/usr/lib"
                    767: 
                    768:    AC_MSG_CHECKING(for libmysql includes in /usr/include)
                    769:    saved_CFLAGS="$CFLAGS"
                    770:    CFLAGS="$CFLAGS -L/$libMySQLinc"
                    771:    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    772:                    libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    773:    CFLAGS=$saved_CFLAGS
                    774: 
                    775:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    776:        AC_MSG_CHECKING(for libmysql includes in /usr/include/mysql)
                    777:        saved_CFLAGS="$CFLAGS"
                    778:        CFLAGS="$CFLAGS $libMySQLinc/mysql"
                    779:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    780:                        libMySQLinc=$libMySQLinc],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    781:        CFLAGS=$saved_CFLAGS
                    782:        libMySQLinc=$libMySQLinc/mysql
                    783:    fi
                    784: 
                    785:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    786:        AC_MSG_CHECKING(for libmysql includes in /usr/local/include)
                    787:        saved_CFLAGS="$CFLAGS"
                    788:        CFLAGS="$CFLAGS $libMySQLinc/../local/include"
                    789:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    790:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    791:        CFLAGS=$saved_CFLAGS
                    792:        libMySQLinc=$libMySQLinc/../local/include
                    793:        libMySQLlib=$libMySQLlib/../local/lib
                    794:    fi
                    795: 
                    796:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    797:        AC_MSG_CHECKING(for libmysql includes in /usr/local/include/mysql)
                    798:        saved_CFLAGS="$CFLAGS"
                    799:        CFLAGS="$CFLAGS $libMySQLinc/../local/include/mysql"
                    800:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    801:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    802:        CFLAGS=$saved_CFLAGS
                    803:        libMySQLinc=$libMySQLinc/../local/include/mysql
                    804:        libMySQLlib=$libMySQLlib/../local/lib
                    805:    fi
                    806: else
                    807:    if test "x$with_mysql" != xno; then
                    808:        libMySQLinc="-I$with_mysql/include"
                    809:        libMySQLlib="$with_mysql/lib"
                    810: 
                    811:        AC_MSG_CHECKING(for libmysql includes in $with_mysql)
                    812:        saved_CFLAGS="$CFLAGS"
                    813:        CFLAGS="$CFLAGS $libMySQLinc"
                    814:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    815:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    816:        CFLAGS=$saved_CFLAGS
                    817: 
                    818:        if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    819:            AC_MSG_CHECKING(for libmysql includes in $with_mysql/mysql)
                    820:            saved_CFLAGS="$CFLAGS"
                    821:            CFLAGS="$CFLAGS $libMySQLinc/mysql"
                    822:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    823:                            libMySQLinc=$libMySQLinc],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    824:            CFLAGS=$saved_CFLAGS
                    825:            libMySQLinc=$libMySQLinc/mysql
                    826:        fi
                    827:    else
                    828:        MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    829:    fi
                    830: fi
                    831: 
                    832: if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPPORT"; then
                    833:    MYSQL_LIB=no
                    834: 
                    835:    if test $MYSQL_LIB = no; then
                    836:        AC_MSG_CHECKING(for libmysql libraries in $libMySQLlib)
                    837:        saved_LIBS="$LIBS"
                    838:        if test $STATIC = no; then
                    839:            LIBS="$LIBS -L/$libMySQLlib -lmysqlclient_r $libMySQLinc"
                    840:        else
1.86      bertrand  841:            LIBS="$LIBS $libMySQLlib/libmysqlclient_r.a $libMySQLinc"
1.1       bertrand  842:        fi
                    843:        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"])
                    844:        LIBS=$saved_LIBS;
                    845:        if test $STATIC = no; then
                    846:            libMySQLlib="-L/$libMySQLlib -lmysqlclient_r"
                    847:        else
                    848:            libMySQLlib="$libMySQLlib/libmysqlclient_r.a"
                    849:            EXT_SQL="$EXT_SQL $libMySQLlib"
                    850:        fi
                    851:    fi
                    852: 
                    853:    if test $MYSQL_LIB = no; then
                    854:        MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    855:    fi
                    856: fi
                    857: 
1.16      bertrand  858: DEBMYSQL=
                    859: 
1.1       bertrand  860: if test "$MYSQL_SUPPORT" != "-DMYSQL_SUPPORT"; then
                    861:    libMySQLinc=
                    862:    libMySQLlib=
1.16      bertrand  863: else
1.17      bertrand  864:    DEBMYSQL=", libmysqlclient18"
1.1       bertrand  865: fi
                    866: 
                    867: AC_SUBST(MYSQL_SUPPORT)
                    868: AC_SUBST(libMySQLinc)
                    869: AC_SUBST(libMySQLlib)
                    870: 
                    871: POSTGRESQL_SUPPORT=-UPOSTGRESQL_SUPPORT
                    872: AC_ARG_WITH(postgresql,
                    873: [  --with-postgresql=PATH    specify directory for installed postgresql],
                    874: [], [with_postgresql=check])
                    875: 
                    876: # with_postgresql : check [pas défini], yes [uniquement --with],
                    877: # no [--without], valeur [--with=valeur].
                    878: 
                    879: if test "x$with_postgresql" = xcheck -o "x$with_postgresql" = xyes; then
                    880:    libPgSQLinc="-I/usr/include"
                    881:    libPgSQLlib="/usr/lib"
                    882: 
                    883:    AC_MSG_CHECKING(for libpq includes in /usr/include)
                    884:    saved_CFLAGS="$CFLAGS"
                    885:    CFLAGS="$CFLAGS $libPgSQLinc"
                    886:    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]); POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]); POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    887:    CFLAGS=$saved_CFLAGS
                    888: 
                    889:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    890:        AC_MSG_CHECKING(for libpq includes in /usr/include/postgresql)
                    891:        saved_CFLAGS="$CFLAGS"
                    892:        CFLAGS="$CFLAGS $libPgSQLinc/postgresql"
                    893:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    894:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    895:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    896:        CFLAGS=$saved_CFLAGS
                    897:        libPgSQLinc=$libPgSQLinc/postgresql
                    898:    fi
                    899: 
                    900:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    901:        AC_MSG_CHECKING(for libpq includes in /usr/include/pgsql)
                    902:        saved_CFLAGS="$CFLAGS"
                    903:        CFLAGS="$CFLAGS $libPgSQLinc/pgsql"
                    904:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    905:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    906:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    907:        CFLAGS=$saved_CFLAGS
                    908:        libPgSQLinc=$libPgSQLinc/pgsql
                    909:    fi
                    910: 
                    911:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    912:        AC_MSG_CHECKING(for libpq includes in /usr/local/include)
                    913:        saved_CFLAGS="$CFLAGS"
                    914:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include"
                    915:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    916:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    917:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    918:        CFLAGS=$saved_CFLAGS
                    919:        libPgSQLinc=$libPgSQLinc/../local/include
                    920:        libPgSQLlib=$libPgSQLlib/../local/lib
                    921:    fi
                    922: 
                    923:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    924:        AC_MSG_CHECKING(for libpq includes in /usr/local/include/postgresql)
                    925:        saved_CFLAGS="$CFLAGS"
                    926:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include/postgresql"
                    927:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    928:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    929:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    930:        CFLAGS=$saved_CFLAGS
                    931:        libPgSQLinc=$libPgSQLinc/../local/include/postgresql
                    932:        libPgSQLlib=$libPgSQLlib/../local/lib
                    933:    fi
                    934: 
                    935:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    936:        AC_MSG_CHECKING(for libpq includes in /usr/local/include/pgsql)
                    937:        saved_CFLAGS="$CFLAGS"
                    938:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include/pgsql"
                    939:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    940:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    941:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    942:        CFLAGS=$saved_CFLAGS
                    943:        libPgSQLinc=$libPgSQLinc/local/include/pgsql
                    944:        libPgSQLlib=$libPgSQLlib/../local/lib
                    945:    fi
                    946: else
                    947:    if test "x$with_postgresql" != xno; then
                    948:        libPgSQLinc="-I$with_postgresql/include"
                    949:        libPgSQLlib="$with_postgresql/lib"
                    950: 
                    951:        AC_MSG_CHECKING(for libpq includes in $libPgSQLinc)
                    952:        saved_CFLAGS="$CFLAGS"
                    953:        CFLAGS="$CFLAGS $libPgSQLinc"
                    954:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    955:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    956:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    957:        CFLAGS=$saved_CFLAGS
                    958: 
                    959:        if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    960:            AC_MSG_CHECKING(for libpq includes in $libPgSQLinc/postgresql)
                    961:            saved_CFLAGS="$CFLAGS"
                    962:            CFLAGS="$CFLAGS $libPgSQLinc/postgresql"
                    963:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    964:                    POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    965:                    POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    966:            CFLAGS=$saved_CFLAGS
                    967:            libPgSQLinc=$libPgSQLinc/postgresql
                    968:        fi
                    969: 
                    970:        if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    971:            AC_MSG_CHECKING(for libpq includes in $libPgSQLinc/pgsql)
                    972:            saved_CFLAGS="$CFLAGS"
                    973:            CFLAGS="$CFLAGS $libPgSQLinc/pgsql"
                    974:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    975:                    POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    976:                    POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    977:            CFLAGS=$saved_CFLAGS
                    978:            libPgSQLinc=$libPgSQLinc/pgsql
                    979:        fi
                    980:    else
                    981:        POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"
                    982:    fi
                    983: fi
                    984: 
                    985: if test "$POSTGRESQL_SUPPORT" = "-DPOSTGRESQL_SUPPORT"; then
                    986:    POSTGRESQL_LIB=no
                    987: 
                    988:    if test $POSTGRESQL_LIB = no; then
                    989:        AC_MSG_CHECKING(for libpq libraries in $libPgSQLlib)
                    990:        saved_LIBS="$LIBS"
                    991:        if test $STATIC = no; then
                    992:            LIBS="$LIBS -L/$libPgSQLlib $libPgSQLinc -lpq"
                    993:        else
                    994:            LIBS="$LIBS $libPgSQLlib/libpq.a $libPgSQLinc"
                    995:        fi
                    996:        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[PGconn *conn; const char *conninfo="dbname=postgres"; conn =
                    997:             PQconnectdb(conninfo);]])],[AC_MSG_RESULT([yes]); POSTGRESQL_LIB="yes"],[AC_MSG_RESULT([no]); POSTGRESQL_LIB="no"])
                    998:        LIBS=$saved_LIBS;
                    999:        if test $STATIC = no; then
                   1000:            libPgSQLlib="-L/$libPgSQLlib -lpq"
                   1001:        else
                   1002:            libPgSQLlib="$libPgSQLlib/libpq.a"
                   1003:            EXT_SQL="$EXT_SQL $libPgSQLlib"
                   1004:        fi
                   1005:    fi
                   1006: fi
                   1007: 
1.16      bertrand 1008: DEBPQ=
                   1009: 
1.1       bertrand 1010: if test "$POSTGRESQL_SUPPORT" != "-DPOSTGRESQL_SUPPORT"; then
                   1011:    libPgSQLinc=
                   1012:    libPgSQLlib=
1.16      bertrand 1013: else
1.17      bertrand 1014:    DEBPQ=", libpq5"
1.1       bertrand 1015: fi
                   1016: 
                   1017: AC_SUBST(POSTGRESQL_SUPPORT)
                   1018: AC_SUBST(libPgSQLinc)
                   1019: AC_SUBST(libPgSQLlib)
                   1020: 
                   1021: # with_postgresql : check [pas défini], yes [uniquement --with],
                   1022: # no [--without], valeur [--with=valeur].
                   1023: AC_ARG_WITH(bourne_shell,
                   1024: [  --with-bourne-shell=PATH  specify path for OS/2 bourne shell],
                   1025: [], [with_bourne_shell=no])
                   1026: 
                   1027: if test "x$with_bourne_shell" = xyes; then
                   1028:    AC_MSG_ERROR([You have to specify a valide shell path !])
                   1029: fi
                   1030: 
                   1031: if test "x$with_bourne_shell" = xno; then
                   1032:    if test $(uname) = "OS/2"; then
                   1033:        AC_MSG_ERROR([With OS/2 or eComstation, you have to specify a valide
                   1034: shell path with --with-bourne-shell=PATH !])
                   1035:    fi
                   1036: 
                   1037:    BSH_PATH=
                   1038: else
                   1039:    if test ! -x $with_bourne_shell; then
                   1040:        AC_MSG_ERROR([$with_bourne_shell is not executable !])
                   1041:    fi
                   1042: 
                   1043:    if test $(uname) = "OS/2"; then
                   1044:        with_os2_bourne_shell=$(echo $with_bourne_shell | \
                   1045:                sed -e '1,$s/\//\\\\\\\\/g')
                   1046:        BSH_PATH=-DBOURNE_SHELL=\"\\\"$with_os2_bourne_shell\\\"\"
                   1047:    else
                   1048:        AC_MSG_WARN([--with-bourne-shell ignored])
                   1049:        BSH_PATH=
                   1050:    fi
                   1051: fi
                   1052: 
                   1053: dnl Checks for sizes
                   1054: AC_CHECK_SIZEOF(void *, 4)
                   1055: AC_CHECK_SIZEOF(char, 1)
                   1056: AC_CHECK_SIZEOF(short int, 2)
                   1057: AC_CHECK_SIZEOF(int, 4)
                   1058: AC_CHECK_SIZEOF(long int, 4)
                   1059: AC_CHECK_SIZEOF(long long int, 8)
                   1060: AC_CHECK_SIZEOF(float, 4)
                   1061: AC_CHECK_SIZEOF(double, 8)
                   1062: AC_CHECK_SIZEOF(long double, 12)
                   1063: 
                   1064: dnl Checks for header files.
                   1065: AC_HEADER_DIRENT
                   1066: AC_HEADER_STDC
                   1067: AC_HEADER_SYS_WAIT
                   1068: AC_CHECK_HEADERS(dlfcn.h fcntl.h math.h pwd.h signal.h string.h termios.h \
                   1069:        time.h unistd.h sys/resource.h sys/stat.h sys/time.h sys/timeb.h \
                   1070:        sys/types.h sys/select.h sys/wait.h stdio.h stdlib.h pthread.h)
                   1071: 
                   1072: dnl Checks for typedefs, structures, and compiler characteristics.
                   1073: AC_C_CONST
                   1074: AC_TYPE_UID_T
                   1075: AC_TYPE_PID_T
                   1076: AC_TYPE_SIZE_T
                   1077: AC_HEADER_TIME
                   1078: AC_STRUCT_TM
                   1079: 
                   1080: dnl Checks for library functions.
                   1081: AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
                   1082: Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
                   1083: AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
                   1084: [AC_LANG_PROGRAM([#include <sys/types.h>
                   1085: #include <signal.h>
                   1086: ],
                   1087:         [return *(signal (0, 0)) (0) == 1;])],
                   1088:           [ac_cv_type_signal=int],
                   1089:           [ac_cv_type_signal=void])])
                   1090: AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
                   1091:            (`int' or `void').])
                   1092: 
                   1093: AC_FUNC_STRCOLL
                   1094: AC_FUNC_STRFTIME
                   1095: AC_FUNC_VPRINTF
                   1096: AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \
                   1097:        strerror strspn strstr strtod)
                   1098: 
                   1099: dnl Check for OpenSSL os/comp
                   1100: AC_ARG_WITH(openssl_arch,
                   1101: [  --with-openssl-arch=ARCH  specify os and compiler for openssl (ARCH or list)],
                   1102: [], [with_openssl_arch=none])
                   1103: 
                   1104: if test $(uname) = "OS/2"; then
                   1105:    bash -c "cd tools/$OPENSSL && os2/OS2-EMX.cmd"
                   1106: else
1.23      bertrand 1107:    if test $build = $host; then
                   1108:        OPENSSL_CROSS=
                   1109:    else
                   1110:        OPENSSL_CROSS="AR=$host-ar RANLIB=$host-ranlib CC=$host-gcc NM=$host-nm"
                   1111:    fi
                   1112:    echo $build $host
                   1113:    echo $OPENSSL_CROSS
1.1       bertrand 1114:    if test "x$with_openssl_arch" = xnone; then
1.23      bertrand 1115:        (cd tools/$OPENSSL && sh -c "$OPENSSL_CROSS ./config no-asm")
1.1       bertrand 1116:    elif test "x$with_openssl_arch" = xyes -o "x$with_openssl_arch" = xno; then
                   1117:        (cd tools/$OPENSSL && ./Configure)
                   1118:        AC_MSG_ERROR([OS/COMP informations are required!])
                   1119:    elif test "x$with_openssl_arch" = xlist; then
                   1120:        (cd tools/$OPENSSL && ./Configure)
                   1121:        AC_MSG_ERROR([Please specify OS and Architecture])
                   1122:    else
1.23      bertrand 1123:        (cd tools/$OPENSSL && sh -c "$OPENSSL_CROSS ./Configure no-asm \
                   1124:                $with_openssl_arch")
1.1       bertrand 1125:    fi
                   1126: fi
                   1127: 
                   1128: if test "$MYGNUPLOT" = "yes"; then
                   1129:    if test ! -d "$srcdir"/tools/$GNUPLOT; then
                   1130:        gunzip -c "$srcdir"/tools/$GNUPLOT.tar.gz | \
                   1131:                (cd "$srcdir/tools" && tar -xf -)
                   1132:    fi
1.6       bertrand 1133: 
                   1134:    if test $RECURSIVE = yes; then
                   1135:        AC_CONFIG_SUBDIRS(tools/$GNUPLOT)
                   1136:    fi
                   1137: 
1.1       bertrand 1138:    GNUPLOT_COMPILATION=$GNUPLOT
                   1139: else
                   1140:    GNUPLOT_COMPILATION=
                   1141: fi
                   1142: 
                   1143: AC_SUBST(GNUPLOT_COMPILATION)
                   1144: 
1.3       bertrand 1145: HOST=$target
1.1       bertrand 1146: AC_SUBST(HOST)
1.25      bertrand 1147: BUILD=$build
                   1148: AC_SUBST(BUILD)
1.1       bertrand 1149: 
1.2       bertrand 1150: my_save_cflags="$CFLAGS"
                   1151: FPCFLAGS=""
1.1       bertrand 1152: 
1.2       bertrand 1153: CFLAGS=-malign-double
                   1154: AC_MSG_CHECKING([whether CC supports -malign-double])
                   1155: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1156:    [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -malign-double"],
                   1157:    [AC_MSG_RESULT([no])])
                   1158: CFLAGS=-mieee-fp
                   1159: AC_MSG_CHECKING([whether CC supports -mieee-fp])
                   1160: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1161:     [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -mieee-fp"],
                   1162:    [AC_MSG_RESULT([no])])
                   1163: CFLAGS=-mieee
                   1164: AC_MSG_CHECKING([whether CC supports -mieee])
                   1165: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1166:     [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -mieee"],
                   1167:    [AC_MSG_RESULT([no])])
                   1168: CFLAGS=$my_save_cflags
                   1169: 
                   1170: CFLAGS="$CFLAGS $FPCFLAGS -Wall -funsigned-char -Wno-pointer-sign"
                   1171: FFLAGS="$FFLAGS $FPCFLAGS -Wall -fno-f2c"
                   1172: FCFLAGS="$FCFLAGS $FPCFLAGS -Wall -fno-f2c"
                   1173: CXXFLAGS="$CXXFLAGS $FPCFLAGS -Wall -funsigned-char"
1.1       bertrand 1174: 
1.2       bertrand 1175: case $target_os in
1.1       bertrand 1176: 
                   1177:    cygwin*)
                   1178:        OS=Cygwin
                   1179:    break ;;
                   1180: 
                   1181:    interix*)
                   1182:        OS=Interix
                   1183:    break ;;
                   1184: 
                   1185:    *)
                   1186:        OS=$(uname)
                   1187:    break ;;
                   1188: 
                   1189: esac
                   1190: 
                   1191: AC_SUBST(OS)
                   1192: 
                   1193: MALLOC=
1.170     bertrand 1194: NO_EXPORT_DYNAMIC=-Wl,--no-export-dynamic
1.1       bertrand 1195: 
                   1196: case $OS in
                   1197:     Darwin)
                   1198:        EXPORT_DYNAMIC=-Wl,-flat_namespace
                   1199:        NESTED_FUNCTIONS=-fnested-functions
                   1200:        CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING"
                   1201:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1202:                --disable-shared --enable-static --enable-threads \
                   1203:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1204:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1205:                LDFLAGS=\"$LDFLAGS\""
                   1206:        C_STANDARD=-std=gnu99
                   1207:        ELF=
                   1208:    break ;;
                   1209: 
                   1210:     Cygwin)
                   1211:        EXPORT_DYNAMIC=-Wl,--export-all-symbols
                   1212:        NESTED_FUNCTIONS=
                   1213:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1214:                --disable-shared --enable-static --enable-threads \
                   1215:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1216:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1217:                LDFLAGS=\"$LDFLAGS\""
                   1218:        C_STANDARD=-std=gnu99
                   1219:        ELF=
                   1220:    break ;;
                   1221: 
                   1222:    Interix)
                   1223:        EXPORT_DYNAMIC=-Wl,--export-all-symbols
                   1224:        NESTED_FUNCTIONS=
                   1225:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1226:                --disable-shared --enable-static --enable-threads \
                   1227:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1228:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1229:                LDFLAGS=\"$LDFLAGS\""
                   1230:        C_STANDARD=-std=gnu99
                   1231:        ELF=
                   1232:    break;;
                   1233: 
                   1234:     AIX)
                   1235:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1236:        NESTED_FUNCTIONS=
                   1237:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1238:                --disable-shared --enable-static --enable-threads \
                   1239:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1240:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1241:                LDFLAGS=\"$LDFLAGS\""
                   1242:        C_STANDARD=-std=gnu99
                   1243:        ELF=
                   1244:    break ;;
                   1245: 
                   1246:     OS/2)
                   1247:        if test $FORCED_FINAL_ENCODING -eq 0; then \
                   1248:            FINAL_ENCODING=CP850; \
1.47      bertrand 1249:            FORCED_FINAL_ENCODING=1;\
1.1       bertrand 1250:        fi;
                   1251:        OS=OS2
                   1252:        NESTED_FUNCTIONS=
                   1253:        EXPORT_DYNAMIC=-Zmap
                   1254:        ac_configure_args="$ac_configure_args --without-readline \
                   1255:                --without-cairo --disable-shared --enable-static \
                   1256:                --enable-threads \
                   1257:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1258:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1259:                LDFLAGS=\"$LDFLAGS\""
                   1260:        C_STANDARD=
                   1261:        ELF=
                   1262:    break;;
                   1263: 
                   1264:    OpenBSD)
                   1265:        if test $FORCED_FINAL_ENCODING -eq 0; then \
                   1266:            FINAL_ENCODING=UTF-8; \
1.47      bertrand 1267:            FORCED_FINAL_ENCODING=1;\
1.1       bertrand 1268:        fi;
                   1269:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1270:        NESTED_FUNCTIONS=
                   1271:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1272:                --disable-shared --enable-static --enable-threads \
                   1273:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1274:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1275:                LDFLAGS=\"$LDFLAGS\""
                   1276:        C_STANDARD=-std=gnu99
                   1277:        ELF=
                   1278:    break;;
                   1279: 
                   1280:     SunOS)
                   1281:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1282:        NESTED_FUNCTIONS=
                   1283: 
                   1284:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1285:                --disable-shared --enable-static --enable-threads \
                   1286:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1287:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1288:                LDFLAGS=\"$LDFLAGS\""
                   1289:        C_STANDARD=-std=gnu99
                   1290:        MALLOC=-lumem
                   1291:        ELF=
                   1292:    break ;;
                   1293: 
                   1294:     NetBSD)
                   1295:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1296:        NESTED_FUNCTIONS=
                   1297: 
                   1298:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1299:                --disable-shared --enable-static --enable-threads \
                   1300:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1301:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1302:                LDFLAGS=\"$LDFLAGS\""
                   1303:        C_STANDARD=-std=gnu99
                   1304:        GCCBIN=`which gcc`
                   1305:        GCCLIB=`dirname $GCCBIN`/../lib
                   1306:        ELF="-Wl,-R/usr/pkg/lib -Wl,-R$GCCLIB"
                   1307:    break ;;
                   1308: 
                   1309:     *)
                   1310:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1311:        NESTED_FUNCTIONS=
                   1312: 
                   1313:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1314:                --disable-shared --enable-static --enable-threads \
                   1315:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1316:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1317:                LDFLAGS=\"$LDFLAGS\""
                   1318:        C_STANDARD=-std=gnu99
                   1319:        ELF=
                   1320:    break ;;
1.5       bertrand 1321: esac
                   1322: 
1.109     bertrand 1323: dnl Correction d'un problème de compilation pour GNUplot 5.0.0
                   1324: ac_configure_args="$ac_configure_args --disable-wxwidgets"
1.130     bertrand 1325: dnl Correction d'un problème d'ABI avec readline
                   1326: ac_configure_args="$ac_configure_args \
                   1327:        --with-abi-version=5.9 --with-rel-version=5.9"
1.109     bertrand 1328: 
1.5       bertrand 1329: case $OS in
                   1330:     OS2)
                   1331:        WHOLE_LIB1=""
                   1332:        WHOLE_LIB2=""
1.6       bertrand 1333:        LIB_PREFIX=""
1.5       bertrand 1334:    break ;;
1.1       bertrand 1335: 
1.5       bertrand 1336:    *)
                   1337:        WHOLE_LIB1="-Wl,-whole-archive"
                   1338:        WHOLE_LIB2="-Wl,-no-whole-archive"
1.6       bertrand 1339:        LIB_PREFIX="lib"
1.5       bertrand 1340:    break ;;
1.1       bertrand 1341: esac
                   1342: 
1.173     bertrand 1343: BROKEN_SIGSEGV=-UBROKEN_SIGSEGV
                   1344: BUILD_SIGSEGV=$SIGSEGV
1.178     bertrand 1345: if test x"$LIB_PREFIX" = x"lib"; then
                   1346:    LIBSIGSEGV=\$\(top_builddir\)/tools/$SIGSEGV/src/.libs/libsigsegv.a
                   1347: else
                   1348:    LIBSIGSEGV=\$\(top_builddir\)/tools/$SIGSEGV/src/.libs/sigsegv.a
                   1349: fi
1.175     bertrand 1350: INCSIGSEGV="-I\$(top_builddir)/tools/$SIGSEGV/src"
1.176     bertrand 1351: CYGWIN_LDFLAGS=
1.173     bertrand 1352: 
1.12      bertrand 1353: case $HOST in
1.33      bertrand 1354:    x86_64-*-linux-gnu)
1.12      bertrand 1355:        ARCH=amd64
                   1356:    break ;;
                   1357: 
1.33      bertrand 1358:    i?86-*-linux-gnu)
1.12      bertrand 1359:        ARCH=i386
                   1360:    break ;;
                   1361: 
1.24      bertrand 1362:    arm-unknown-linux-gnueabi)
                   1363:        ARCH=armel
                   1364:    break;;
                   1365: 
1.58      bertrand 1366:    mips*el-unknown-linux-gnu)
1.53      bertrand 1367:        ARCH=mipsel
                   1368:    break;;
                   1369: 
1.176     bertrand 1370:    x86_64-*-cygwin)
1.173     bertrand 1371:        BROKEN_SIGSEGV=-DBROKEN_SIGSEGV
1.174     bertrand 1372:        BUILD_SIGSEGV=
1.173     bertrand 1373:        INCSIGSEGV=
                   1374:        LIBSIGSEGV=
                   1375:        ARCH=$(echo $HOST | cut -f1 -d-)
1.177     bertrand 1376:        CYGWIN_LDFLAGS=-Wl,--allow-multiple-definition \
                   1377:                -Wl,--out-implib,rpl.exe.a
1.173     bertrand 1378:    break;;
                   1379: 
1.12      bertrand 1380:    *)
1.72      bertrand 1381:        ARCH=$(echo $HOST | cut -f1 -d-)
1.12      bertrand 1382:    break ;;
                   1383: esac
                   1384: 
1.173     bertrand 1385: AC_SUBST(INCSIGSEGV)
                   1386: AC_SUBST(LIBSIGSEGV)
1.5       bertrand 1387: AC_SUBST(WHOLE_LIB1)
                   1388: AC_SUBST(WHOLE_LIB2)
1.6       bertrand 1389: AC_SUBST(LIB_PREFIX)
1.176     bertrand 1390: AC_SUBST(CYGWIN_LDFLAGS)
1.5       bertrand 1391: 
1.1       bertrand 1392: AC_SUBST(C_STANDARD)
                   1393: AC_SUBST(EXPORT_DYNAMIC)
1.170     bertrand 1394: AC_SUBST(NO_EXPORT_DYNAMIC)
1.1       bertrand 1395: AC_SUBST(NESTED_FUNCTIONS)
                   1396: AC_SUBST(SEMAPHORES_NOMMES)
                   1397: AC_SUBST(IPCS_SYSV)
                   1398: AC_SUBST(SEMUN)
                   1399: AC_SUBST(IPV6)
                   1400: AC_SUBST(BSH_PATH)
                   1401: AC_SUBST(ELF)
1.12      bertrand 1402: AC_SUBST(ARCH)
1.1       bertrand 1403: 
                   1404: AC_SUBST(NCURSES)
                   1405: AC_SUBST(READLINE)
                   1406: AC_SUBST(UNITS)
                   1407: AC_SUBST(GSL)
                   1408: AC_SUBST(GPP)
                   1409: AC_SUBST(GNUPLOT)
                   1410: AC_SUBST(FILE)
                   1411: AC_SUBST(ICONV)
                   1412: AC_SUBST(SQLITE)
                   1413: AC_SUBST(OPENSSL)
                   1414: AC_SUBST(LIBXPM)
                   1415: AC_SUBST(OPENMOTIF)
                   1416: AC_SUBST(BUILD_OPENMOTIF)
                   1417: AC_SUBST(SIGSEGV)
                   1418: AC_SUBST(FINAL_ENCODING)
1.47      bertrand 1419: AC_SUBST(FORCED_FINAL_ENCODING)
1.1       bertrand 1420: AC_SUBST(DATE)
                   1421: AC_SUBST(EXT_SQL)
                   1422: AC_SUBST(MALLOC)
                   1423: AC_SUBST(GMP)
                   1424: AC_SUBST(MPFR)
1.137     bertrand 1425: AC_SUBST(MPFI)
1.1       bertrand 1426: AC_SUBST(NTL)
                   1427: AC_SUBST(COCOA)
                   1428: AC_SUBST(PARI)
                   1429: AC_SUBST(GIAC)
                   1430: AC_SUBST(INCMOTIF)
                   1431: AC_SUBST(LIBMOTIF)
1.197     bertrand 1432: AC_SUBST(MODULE_MOTIF)
1.62      bertrand 1433: AC_SUBST(ZLIB)
1.173     bertrand 1434: AC_SUBST(BUILD_SIGSEGV)
                   1435: AC_SUBST(BROKEN_SIGSEGV)
1.1       bertrand 1436: 
                   1437: AC_SUBST(CFLAGS)
                   1438: AC_SUBST(CXXFLAGS)
                   1439: AC_SUBST(FFLAGS)
                   1440: AC_SUBST(FCFLAGS)
                   1441: AC_SUBST(LDFLAGS)
1.23      bertrand 1442: AC_SUBST(SYSROOT)
1.25      bertrand 1443: AC_SUBST(SYSROOT2)
1.1       bertrand 1444: 
1.16      bertrand 1445: AC_SUBST(DEBPQ)
                   1446: AC_SUBST(DEBMYSQL)
                   1447: AC_SUBST(DEBVIM)
                   1448: 
1.6       bertrand 1449: if test $RECURSIVE = yes; then
                   1450:    AC_CONFIG_SUBDIRS(tools/$NCURSES)
                   1451:    AC_CONFIG_SUBDIRS(tools/$READLINE)
                   1452:    AC_CONFIG_SUBDIRS(tools/$GSL)
                   1453:    AC_CONFIG_SUBDIRS(tools/$GPP)
                   1454:    AC_CONFIG_SUBDIRS(tools/$FILE)
                   1455:    AC_CONFIG_SUBDIRS(tools/$ICONV)
                   1456:    AC_CONFIG_SUBDIRS(tools/$SQLITE)
                   1457:    AC_CONFIG_SUBDIRS(tools/$UNITS)
1.174     bertrand 1458:    if test x$BUILD_SIGSEGV = x$SIGSEGV; then
                   1459:        AC_CONFIG_SUBDIRS(tools/$SIGSEGV)
                   1460:    fi
1.6       bertrand 1461: fi
1.1       bertrand 1462: 
                   1463: AC_CONFIG_FILES(Makefile)
1.59      bertrand 1464: AC_CONFIG_FILES(HEADER)
1.1       bertrand 1465: AC_CONFIG_FILES(tools/Makefile)
                   1466: AC_CONFIG_FILES(src/Makefile)
                   1467: AC_CONFIG_FILES(man/Makefile)
                   1468: AC_CONFIG_FILES(man/fr_FR/Makefile)
                   1469: AC_CONFIG_FILES(doc/Makefile)
                   1470: AC_CONFIG_FILES(scripts/Makefile)
                   1471: AC_CONFIG_FILES(scripts/mkrplso)
                   1472: AC_CONFIG_FILES(scripts/rplcc)
                   1473: AC_CONFIG_FILES(scripts/rpllink)
                   1474: AC_CONFIG_FILES(rpltags/Makefile)
                   1475: AC_CONFIG_FILES(rpliconv/Makefile)
                   1476: AC_CONFIG_FILES(rplsums/Makefile)
                   1477: AC_CONFIG_FILES(rplcas/Makefile)
                   1478: AC_CONFIG_FILES(rplawk/Makefile)
                   1479: AC_CONFIG_FILES(lapack/lapack/Makefile)
                   1480: AC_CONFIG_FILES(lapack/blas/Makefile)
1.196     bertrand 1481: AC_CONFIG_FILES(modules/motif/Makefile)
1.195     bertrand 1482: AC_CONFIG_FILES(modules/sets/Makefile)
1.1       bertrand 1483: 
                   1484: AC_CONFIG_FILES(man/rpl.1)
                   1485: AC_CONFIG_FILES(man/rplcc.1)
                   1486: AC_CONFIG_FILES(man/rpllink.1)
                   1487: AC_CONFIG_FILES(man/rpltags.1)
                   1488: AC_CONFIG_FILES(man/mkrplso.1)
                   1489: AC_CONFIG_FILES(man/fr_FR/rpl.1)
                   1490: AC_CONFIG_FILES(man/fr_FR/rplcc.1)
                   1491: AC_CONFIG_FILES(man/fr_FR/rpllink.1)
                   1492: AC_CONFIG_FILES(man/fr_FR/rpltags.1)
                   1493: AC_CONFIG_FILES(man/fr_FR/mkrplso.1)
                   1494: 
1.12      bertrand 1495: AC_CONFIG_FILES(DEBIAN/control)
                   1496: 
1.1       bertrand 1497: AC_OUTPUT

CVSweb interface <joel.bertrand@systella.fr>