Annotation of rpl/configure.ac, revision 1.94

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

CVSweb interface <joel.bertrand@systella.fr>