"Fossies" - the Fresh Open Source Software Archive

Member "vfplot-1.0.15/configure.in" (7 Nov 2019, 4757 Bytes) of package /linux/privat/vfplot-1.0.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.in": 1.0.14_vs_1.0.15.

    1 dnl autoconf configure.in
    2 dnl J.J.Green 2007, 2016
    3 
    4 AC_INIT(vfplot, 1.0.15, j.j.green@gmx.co.uk)
    5 
    6 dnl defaults
    7 
    8 opt_enable_pthread=yes
    9 opt_enable_pthread_extra=no
   10 opt_enable_matio=no
   11 opt_enable_gerris=no
   12 opt_enable_dmalloc=no
   13 opt_enable_profile=no
   14 opt_enable_tests=no
   15 opt_enable_coverage=no
   16 
   17 AC_ARG_ENABLE(pthread,
   18         AC_HELP_STRING([--enable-pthread],
   19     [use POSIX threads (default is yes)]),
   20     [opt_enable_pthread=$enableval])
   21 
   22 AC_ARG_ENABLE(pthread-extra,
   23         AC_HELP_STRING([--enable-pthread-extra],
   24     [use pthreads extra, for OSX (default is no)]),
   25     [opt_enable_pthread_extra=$enableval])
   26 
   27 AC_ARG_ENABLE(gerris,
   28         AC_HELP_STRING([--enable-gerris],
   29     [support reading gerris flow simulation files (default is no)]),
   30     [opt_enable_gerris=$enableval])
   31 
   32 AC_ARG_ENABLE(matio,
   33         AC_HELP_STRING([--enable-matio],
   34     [support reading Matlab v6 binary files (default is no)]),
   35     [opt_enable_matio=$enableval])
   36 
   37 AC_ARG_ENABLE(profile,
   38         AC_HELP_STRING([--enable-profile],
   39     [instrument for profiling (default is no)]),
   40     [opt_enable_profile=$enableval])
   41 
   42 AC_ARG_ENABLE(tests,
   43         AC_HELP_STRING([--enable-tests],
   44     [unit testing support (default is no)]),
   45     [opt_enable_tests=$enableval])
   46 
   47 AC_ARG_ENABLE(coverage,
   48         AC_HELP_STRING([--enable-coverage],
   49     [code coverage (default is no)]),
   50         [opt_enable_coverage=$enableval])
   51 
   52 dnl require a C99 compiler
   53 
   54 AC_PROG_CC([gcc clang])
   55 AC_PROG_CC_C99
   56 
   57 dnl bizarre that this is not there by default
   58 
   59 if eval "test $GCC"; then
   60    CFLAGS="$CFLAGS -Wall"
   61 fi
   62 
   63 AC_PROG_MAKE_SET
   64 AC_PROG_INSTALL
   65 AC_PATH_PROG(GGO, gengetopt)
   66 
   67 AC_HEADER_STDC
   68 AC_FUNC_ALLOCA
   69 
   70 AC_CHECK_HEADERS(unistd.h)
   71 AC_CHECK_HEADERS(signal.h)
   72 AC_CHECK_HEADERS(sys/time.h)
   73 AC_CHECK_HEADERS(sys/resource.h)
   74 AC_CHECK_HEADERS(sys/types.h)
   75 AC_CHECK_HEADERS(sys/stat.h)
   76 
   77 if test $opt_enable_pthread = yes; then
   78 AC_CHECK_HEADER(pthread.h,
   79         [AC_DEFINE(HAVE_PTHREAD_H, 1,
   80                [Define to 1 if you have <pthread.h>])
   81         AC_DEFINE(USE_LIST_NODE_ALLOCATOR, 1,
   82                   [Define to 1 to use kdtree node allocator])
   83                 AC_SUBST(PTHREAD, "-pthread")])
   84 fi
   85 
   86 AC_CHECK_HEADER(netcdf.h)
   87 AC_CHECK_HEADER(zlib.h,
   88     [AC_DEFINE(HAVE_ZLIB_H, 1, [Define to 1 if you have <zlib.h>])])
   89 
   90 AC_CHECK_LIB(m, sin)
   91 AC_CHECK_LIB(m, sincos)
   92 AC_CHECK_LIB(netcdf, nc_open)
   93 AC_CHECK_LIB(z, gzopen)
   94 
   95 AC_CHECK_FUNCS(isnan)
   96 AC_CHECK_FUNCS(strsignal)
   97 AC_CHECK_FUNCS(sincos)
   98 AC_CHECK_FUNCS(getrusage)
   99 AC_CHECK_FUNCS(gettimeofday)
  100 AC_CHECK_FUNCS(sysconf)
  101 AC_CHECK_FUNCS(stat)
  102 
  103 dnl | matio option
  104 
  105 if test $opt_enable_matio = yes; then
  106    AC_CHECK_HEADER(matio.h,
  107     [AC_DEFINE(HAVE_MATIO_H, 1, [Define to 1 if you have <matio.h>])])
  108    AC_CHECK_LIB(matio, Read5)
  109 fi
  110 
  111 dnl | tests option (implies gerris)
  112 
  113 if test $opt_enable_tests = yes; then
  114    if test $opt_enable_gerris = no; then
  115       AC_WARN([Some acceptance tests fail without Gerris support])
  116    fi
  117    AC_PATH_PROG(GS, gs)
  118    AC_CHECK_LIB(cunit, CU_add_test)
  119    AC_SUBST(WITH_UNIT, 1)
  120    AC_MSG_CHECKING([CUnit version])
  121    AC_COMPILE_IFELSE([
  122      AC_LANG_SOURCE([[
  123        #include <CUnit/CUnit.h>
  124        int main(void) {
  125          CU_SuiteInfo suite;
  126          suite.pSetUpFunc = NULL;
  127          return 0; }
  128        ]])
  129      ],
  130      [
  131        AC_MSG_RESULT([2.1-3 or later])
  132        cunit213=1
  133      ],
  134      [
  135        AC_MSG_RESULT([2.1-2 or earlier])
  136        cunit213=0
  137      ])
  138    AC_DEFINE_UNQUOTED(CUNIT_213,
  139      $cunit213,
  140      [Define if CUnit version 2.1-3 or later])
  141 fi
  142 
  143 dnl | gerris option
  144 
  145 if test $opt_enable_gerris = yes; then
  146    CFLAGS="$CFLAGS `pkg-config --cflags gerris2D`"
  147    CPPFLAGS="$CPPLAGS `pkg-config --cflags gerris2D`"
  148    AC_CHECK_HEADER(glib.h)
  149    AC_CHECK_HEADER(gmodule.h)
  150    AC_CHECK_HEADER(gts.h)
  151    AC_CHECK_HEADER(gfs.h,
  152     [AC_DEFINE(HAVE_GFS_H, 1, [Define to 1 if you have <gfs.h>])
  153      AC_SUBST(WITH_GFS, 1)])
  154    LDFLAGS="$LDFLAGS -pthread -Wl,-export-dynamic"
  155    AC_CHECK_LIB(glib-2.0, g_allocator_new)
  156    AC_CHECK_LIB(gmodule-2.0, g_module_open)
  157    AC_CHECK_LIB(gts, gts_object_new)
  158    AC_CHECK_LIB(gfs2D, gfs_simulation_read)
  159 fi
  160 
  161 dnl | pthread-extra option
  162 
  163 if test $opt_enable_pthread_extra = yes; then
  164   AC_SUBST(WITH_PTHREAD_EXTRA, 1)
  165   AC_DEFINE(WITH_PTHREAD_EXTRA, 1,
  166             [Define to 1 to use pthread extra, for OSX])
  167 fi
  168 
  169 dnl | profile option
  170 
  171 if test $opt_enable_profile = yes; then
  172    AC_SUBST(GCC_PROFILING_CFLAGS, ["-pg -fno-omit-frame-pointer"])
  173    AC_PATH_PROG(GPROF, gprof)
  174 fi
  175 
  176 dnl | coverage option
  177 
  178 if test $opt_enable_coverage = yes; then
  179    CFLAGS="$CFLAGS --coverage"
  180    LDFLAGS="$LDFLAGS --coverage"
  181 fi
  182 
  183 AC_SUBST(INSTALL_PROGRAM)
  184 AC_SUBST(INSTALL_DATA)
  185 
  186 AC_DEFINE(VERSION, PACKAGE_VERSION, "version of the package")
  187 
  188 AC_CONFIG_HEADER(src/include/config.h)
  189 
  190 AC_OUTPUT([src/Common.mk])
  191 AC_OUTPUT([src/sag2grd/sag2grd], [chmod u+x src/sag2grd/sag2grd])