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