Annotation of rpl/configure.ac, revision 1.122

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

CVSweb interface <joel.bertrand@systella.fr>