dnl Process this file with autoconf to produce a configure script. AC_INIT(statistics/jtest.c) AM_INIT_AUTOMAKE(gsl, 0.3b) AM_CONFIG_HEADER(config.h) dnl things required by automake AC_ARG_PROGRAM AC_PROG_MAKE_SET dnl Check for which system. AC_CANONICAL_HOST dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB dnl some magic to get a full path to the working directory full_top_srcdir=`cd $srcdir; pwd` full_top_builddir=`pwd` echo srcdir is $srcdir echo full_top_srcdir is $full_top_srcdir echo full_top_builddir is $full_top_builddir AC_SUBST(full_top_srcdir) AC_SUBST(full_top_builddir) dnl Checks for header files. dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. dnl Replace `main' with a function in -lm: AC_CHECK_LIB(m, main) AC_CHECK_FUNCS(isinf) AC_FUNC_ALLOCA AC_FUNC_VPRINTF dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added. AC_REPLACE_FUNCS(memcpy memmove strdup strerror) AC_CHECK_FUNCS(clock) AC_CACHE_CHECK(for CLOCKS_PER_SEC, ac_cv_decl_clocks_per_sec, AC_EGREP_CPP(yes, [ #include #ifdef CLOCKS_PER_SEC yes #endif ], ac_cv_decl_clocks_per_sec=yes, ac_cv_decl_clocks_per_sec=no) ) if test "$ac_cv_decl_clocks_per_sec" = yes ; then AC_DEFINE(HAVE_CLOCKS_PER_SEC) else AC_MSG_CHECKING(whether CLOCKS_PER_SEC is known for $host_os) case "$host" in *-*-sunos4.*) AC_DEFINE(HAVE_GUESSED_CLOCKS_PER_SEC,1000000) AC_MSG_RESULT([yes (microseconds)]) ;; *) AC_DEFINE(HAVE_GUESSED_CLOCKS_PER_SEC,1000000) AC_MSG_RESULT([no, assuming microseconds]) ;; esac fi AC_CHECK_FUNCS(rand) AC_CACHE_CHECK(for RAND_MAX, ac_cv_decl_rand_max, AC_EGREP_CPP(yes, [ #include #include #ifdef RAND_MAX yes #endif ], ac_cv_decl_rand_max=yes, ac_cv_decl_rand_max=no) ) if test "$ac_cv_decl_rand_max" = yes ; then AC_DEFINE(HAVE_RAND_MAX) else AC_MSG_CHECKING(whether RAND_MAX is known for $host_os) case "$host" in *-*-sunos4.*) AC_DEFINE(HAVE_GUESSED_RAND_MAX,2147483647) AC_MSG_RESULT([yes (2^{31}-1)]) ;; *) AC_DEFINE(HAVE_GUESSED_RAND_MAX,32767) AC_MSG_RESULT([no, assuming 32767]) ;; esac fi AC_CACHE_CHECK(for EXIT_SUCCESS and EXIT_FAILURE, ac_cv_decl_exit_success_and_failure, AC_EGREP_CPP(yes, [ #include #ifdef EXIT_SUCCESS yes #endif ], ac_cv_decl_exit_success_and_failure=yes, ac_cv_decl_exit_success_and_failure=no) ) if test "$ac_cv_decl_clocks_per_sec" = yes ; then AC_DEFINE(HAVE_EXIT_SUCCESS_AND_FAILURE) fi ; AC_OUTPUT(err/Makefile fft/Makefile specfunc/Makefile statistics/Makefile roots/Makefile random/Makefile randist/Makefile siman/Makefile integration/Makefile doc/Makefile utils/Makefile Makefile)