Annotation of rpl/configure.ac, revision 1.96

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

CVSweb interface <joel.bertrand@systella.fr>