123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- AC_INIT([GNU plotutils],[2.6],[bug-plotutils@gnu.org])
- AC_PREREQ(2.59)
- AC_CONFIG_SRCDIR(graph/graph.c)
- AM_INIT_AUTOMAKE([plotutils],[2.6])
- AM_CONFIG_HEADER(config.h:config.hin)
- AH_TEMPLATE([HAVE_NULL_FLUSH],
- [Define to 1 if in your libc, fflush(NULL) flushes all outstreams.])
- AH_TEMPLATE([_HPUX_SOURCE],
- [Define to 1 under HP/UX to get matherr-related things from math.h.])
- AH_TEMPLATE([PTHREAD_SUPPORT],
- [Define to 1 if your libc includes support for pthreads.])
- AH_TEMPLATE([USE_MOTIF],
- [Define to request that Motif should be used, if X11 is used.])
- AH_TEMPLATE([X_THREAD_SUPPORT],
- [Define to signal support in libXt/libX11 for multithreading.])
- AH_TEMPLATE([HAVE_DBE_SUPPORT],
- [Define if -lXext has support for the DBE X11 protocol extension.])
- AH_TEMPLATE([HAVE_MBX_SUPPORT],
- [Define if -lXext has support for the MBX X11 protocol extension.])
- AH_TEMPLATE([HAVE_LIBPNG],
- [Define if libpng is available.])
- AH_TEMPLATE([INCLUDE_PNG_SUPPORT],
- [Define to request PNG support (requires HAVE_LIBPNG, HAVE_PNG_H).])
- AH_TEMPLATE([USE_LJ_FONTS_IN_X],
- [Define to enable support for the 45 LaserJet fonts in X output.])
- AH_TEMPLATE([USE_LJ_FONTS_IN_PS],
- [Define to enable support for the 45 LaserJet fonts in PS output.])
- AH_TEMPLATE([USE_PS_FONTS_IN_PCL],
- [Define to enable support for the 35 PS fonts in PCL output.])
- if test "x$CFLAGS" = "x"; then
- CFLAGS_NOT_SET_BY_INSTALLER="yes"
- else
- CFLAGS_NOT_SET_BY_INSTALLER="no"
- fi
- if test "x$CXXFLAGS" = "x"; then
- CXXFLAGS_NOT_SET_BY_INSTALLER="yes"
- else
- CXXFLAGS_NOT_SET_BY_INSTALLER="no"
- fi
- AC_PROG_LIBTOOL
- AC_PROG_CC_C99
- AC_PROG_CXX
- AC_EXEEXT
- AC_C_CONST
- AC_TYPE_SIZE_T
- AC_TYPE_PID_T
- AC_TYPE_SIGNAL
- AC_MSG_CHECKING(whether flushing a null FILE pointer works)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- int main()
- {
- FILE *fpw, *fpr;
- char test_array[7];
- if ((fpw = fopen ("conftest0", "w")) == (FILE *)0
- || fwrite ("FOOBAR", 1, 7, fpw) != 7
- || fflush ((FILE *)0) < 0
- || (fpr = fopen ("conftest0", "r")) == (FILE *)0
- || fread (test_array, 1, 7, fpr) != 7)
- exit (1);
- else
- exit(0); }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
- AC_HEADER_STDC
- AC_CHECK_HEADERS(string.h limits.h float.h)
- AC_CHECK_HEADERS(malloc.h pthread.h strings.h unistd.h values.h sys/select.h sys/stdtypes.h sys/time.h sys/types.h sys/wait.h)
- AC_HEADER_TIME
- AC_EGREP_HEADER(_HPUX_SOURCE, math.h, [AC_EGREP_HEADER(matherr, math.h, [AC_DEFINE(_HPUX_SOURCE)])])
- AC_FUNC_ALLOCA
- AC_PROG_YACC
- AM_PROG_LEX
- AC_CHECK_LIB(c, pthread_mutex_init, [AC_DEFINE(PTHREAD_SUPPORT)])
- AC_CHECK_FUNCS(ctime_r localtime_r)
- AC_CHECK_FUNCS(waitpid)
- AC_CHECK_LIB(mx, matherr, LIBS="$LIBS -lmx", LIBS="$LIBS -lm")
- AC_CHECK_FUNCS(memcpy memmove strchr strcasecmp strerror matherr j0 erf)
- AC_CHECK_FUNCS(lgamma gamma)
- AC_PATH_XTRA
- AC_SUBST(X_CFLAGS)
- AC_SUBST(X_LIBS)
- AC_SUBST(X_TOOLKIT_LIBS)
- AC_SUBST(X_PRE_LIBS)
- AC_SUBST(X_BASIC_LIBS)
- AC_SUBST(X_EXTRA_LIBS)
- X_TOOLKIT_LIBS="-lXt"
- X_BASIC_LIBS="-lXext -lX11"
- our_saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$X_LIBS $LDFLAGS"
- AC_CHECK_LIB(Xt, XtToolkitThreadInitialize, [AC_DEFINE(X_THREAD_SUPPORT)],[],$X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS)
- LDFLAGS="$our_saved_LDFLAGS"
- our_saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$X_LIBS $LDFLAGS"
- AC_CHECK_LIB(Xext, XdbeQueryExtension, [AC_DEFINE(HAVE_DBE_SUPPORT)], [], -lX11 "$X_EXTRA_LIBS")
- AC_CHECK_LIB(Xext, XmbufQueryExtension, [AC_DEFINE(HAVE_MBX_SUPPORT)], [], -lX11 "$X_EXTRA_LIBS")
- LDFLAGS="$our_saved_LDFLAGS"
- our_saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$X_CFLAGS $CPPFLAGS"
- AC_CHECK_HEADERS([X11/Xlib.h])
- AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [], [],
- [
- ])
- AC_CHECK_HEADERS([X11/extensions/multibuf.h], [], [],
- [
- ])
- CPPFLAGS="$our_saved_CPPFLAGS"
- AC_ARG_WITH(athena, [ --with-athena[=DIR] use Athena widgets: includes and libraries in DIR])
- AC_ARG_WITH(motif, [ --with-motif[=DIR] use Motif widgets: includes and libraries in DIR])
- AC_ARG_WITH(xpm, [ --with-xpm[=DIR] use Xpm with Motif: include and library in DIR])
- case "x$with_motif" in
- xno|x)
- case "x$with_athena" in
- xyes|x)
- X_TOOLKIT_LIBS="-lXaw -lXmu $X_TOOLKIT_LIBS"
- ;;
- xno) ;;
- *)
- X_TOOLKIT_LIBS="-lXaw -lXmu $X_TOOLKIT_LIBS"
- X_CFLAGS="$X_CFLAGS -I$with_athena/include"
- X_LIBS="$X_LIBS -L$with_athena/lib"
- ;;
- esac
- ;;
- *)
- if test "x$with_motif" != "xyes"; then
- X_CFLAGS="$X_CFLAGS -I$with_motif/include"
- X_LIBS="$X_LIBS -L$with_motif/lib"
- fi
- X_TOOLKIT_LIBS="-lXm $X_TOOLKIT_LIBS"
- our_saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $X_LIBS"
- case "x$with_xpm" in
- xno|x)
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
- ;;
- xyes)
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
- ;;
- *)
- LDFLAGS="$LDFLAGS -L$with_xpm/lib"
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_CFLAGS="$X_CFLAGS -I$with_xpm/include"; X_LIBS="$X_LIBS -L$with_xpm/lib"; X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
- ;;
- esac
- LDFLAGS="$our_saved_LDFLAGS"
- our_saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $X_LIBS"
- AC_CHECK_LIB(Xp, XpQueryExtension, X_BASIC_LIBS="-lXp $X_BASIC_LIBS", , -lXext -lX11)
- AC_CHECK_LIB(gen, regex, LIBS="$LIBS -lc -lgen", LIBS="$LIBS")
- AC_CHECK_LIB(PW, regex, LIBS="$LIBS -lc -lPW", LIBS="$LIBS")
- LDFLAGS="$our_saved_LDFLAGS"
- AC_DEFINE(USE_MOTIF)
- ;;
- esac
- AM_CONDITIONAL(NO_X, test "x$no_x" = "xyes")
- AC_CHECK_HEADERS(png.h, png_support="yes", png_support="no")
- AC_CHECK_LIB(png, png_set_tRNS, [AC_DEFINE(HAVE_LIBPNG)], png_support="no", -lz -lm)
- AC_ARG_WITH(libpng, [ --without-libpng omit PNG support even if libpng and zlib are present], if test "x${with_libpng}" = "xno"; then png_support="no"; fi)
- if test "x${png_support}" = "xyes"; then AC_DEFINE(INCLUDE_PNG_SUPPORT) fi
- AM_CONDITIONAL(NO_PNG, test "x${png_support}" = "xno")
- AC_ARG_ENABLE(ps-fonts-in-pcl,
- [ --enable-ps-fonts-in-pcl enable use of PS fonts in PCL and HP-GL/2 output],
- [if test "x$enableval" = "xyes"; then
- echo enabling support for the 35 PS fonts in PCL 5 and HP-GL/2 output
- ps_fonts_in_pcl=1
- AC_DEFINE(USE_PS_FONTS_IN_PCL)
- else
- ps_fonts_in_pcl=0
- fi],
- ps_fonts_in_pcl=0)
- AC_SUBST(ps_fonts_in_pcl)
- AC_ARG_ENABLE(lj-fonts-in-ps,
- [ --enable-lj-fonts-in-ps enable use of LaserJet fonts in PS output],
- [if test "x$enableval" = "xyes"; then
- echo enabling support for the 45 LaserJet fonts in PS output
- AC_DEFINE(USE_LJ_FONTS_IN_PS)
- fi])
- AC_ARG_ENABLE(lj-fonts-in-x,
- [ --enable-lj-fonts-in-x enable use of LaserJet fonts on X displays],
- [if test "x$enableval" = "xyes"; then
- echo enabling support for the 45 LaserJet fonts on X displays
- AC_DEFINE(USE_LJ_FONTS_IN_X)
- fi])
- AC_ARG_ENABLE(libplotter, [ --enable-libplotter build the C++ Plotter class library and C++ software], echo enabling construction of the C++ class library; no_libplotter="no", no_libplotter="yes"; extralib="")
- AM_CONDITIONAL(NO_LIBPLOTTER, test "x$no_libplotter" = "xyes")
- AC_ARG_ENABLE(libxmi, [ --enable-libxmi build the libxmi scan-conversion library], echo enabling construction of the libxmi scan-conversion library; no_libxmi="no", no_libxmi="yes")
- AM_CONDITIONAL(NO_LIBXMI, test "x$no_libxmi" = "xyes")
- if test "x$CFLAGS_NOT_SET_BY_INSTALLER" = "xyes"; then
- if test "x$GCC" = "xyes"; then
- CFLAGS="-O2"
- else
- CFLAGS="-O"
- fi
- fi
- if test "x$CXXFLAGS_NOT_SET_BY_INSTALLER" = "xyes"; then
- if test "x$GXX" = "xyes"; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS="-O"
- fi
- fi
- if test "x${GCC}" = "xyes"; then
- AC_CACHE_CHECK(for gcc strength-reduce bug, ac_cv_c_gcc_strength_bug,
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- int main()
- {
- static int Array[[3]];
- unsigned int B = 3;
- int i;
- for (i=0; i < B; i++)
- Array[[i]] = i - 3;
- exit (Array[[1]] != -2);
- }]])],
- [ac_cv_c_gcc_strength_bug="no"],[ac_cv_c_gcc_strength_bug="yes"],[ac_cv_c_gcc_strength_bug="yes"]) )
- if test "$ac_cv_c_gcc_strength_bug" = "yes"
- then
- CFLAGS="$CFLAGS -fno-strength-reduce"
- fi
- fi
- AC_CONFIG_FILES([Makefile double/Makefile graph/Makefile hersheydemo/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile libxmi/Makefile libxmi/info/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile])
- AC_OUTPUT
|