"Fossies" - the Fresh Open Source Software Archive

Member "udunits-2.2.28/configure.ac" (8 Dec 2020, 4218 Bytes) of package /linux/privat/udunits-2.2.28.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. 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.ac": 2.2.26_vs_2.2.28.

    1 #                                               -*- Autoconf -*-
    2 # Process this file with autoconf to produce a configure script.
    3 #
    4 # Copyright 2013 University Corporation for Atmospheric Research
    5 #
    6 # This file is part of the UDUNITS-2 package.  See the file COPYRIGHT
    7 # in the top-level source-directory of the package for terms and
    8 # conditions.
    9 #
   10 
   11 AC_PREREQ(2.59)
   12 AC_INIT([UDUNITS], [2.2.28], [support-udunits@unidata.ucar.edu])
   13 AC_CONFIG_SRCDIR([lib/converter.c])
   14 AC_CONFIG_AUX_DIR([build-aux])
   15 AC_CONFIG_MACRO_DIR([m4])
   16 AM_INIT_AUTOMAKE([foreign subdir-objects])
   17 AC_CONFIG_HEADERS([config.h])
   18 LT_INIT([win32-dll])
   19 
   20 CFLAGS_COVERAGE=''
   21 LIBS_COVERAGE=''
   22 
   23 AC_ARG_ENABLE([coverage],
   24 [AS_HELP_STRING([--enable-coverage],[Turn on code-coverage support])],
   25 [case "${enableval}" in
   26   yes) CFLAGS_COVERAGE='--coverage'
   27        LIBS_COVERAGE=-lgcov
   28        coverage_enabled=true;;
   29   no) ;;
   30   *) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
   31 esac])
   32 AC_SUBST(CFLAGS_COVERAGE)
   33 AC_SUBST(LIBS_COVERAGE)
   34 
   35 AC_ARG_ENABLE([debug],
   36 [AS_HELP_STRING([--enable-debug],[Turn on debugging support])],
   37 [case "${enableval}" in
   38   yes)
   39     CFLAGS="${CFLAGS:+$CFLAGS }-g -O0"
   40     debug=true ;;
   41   no)
   42     CFLAGS="-O${CFLAGS:+ $CFLAGS}"
   43     debug=false ;;
   44   *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
   45 esac],
   46 [if test "$coverage_enabled" = true; then
   47     CFLAGS="-g${CFLAGS:+ $CFLAGS}"
   48     debug=true
   49 else
   50     debug=false
   51 fi
   52 ])
   53 AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
   54 
   55 AM_CONDITIONAL([ENABLE_UDUNITS_1], [true])
   56 AC_ARG_ENABLE([udunits-1],
   57     [AS_HELP_STRING([--disable-udunits-1],
   58         [Turn off support for the UDUNITS-1 API [default=enabled]])],
   59     [case "${enableval}" in
   60       no)   AM_CONDITIONAL([ENABLE_UDUNITS_1], [false]) ;;
   61       yes)  ;;
   62       *)    AC_MSG_ERROR([bad value ${enableval} for --enable-udunits-1]) ;;
   63     esac])
   64 
   65 # Ensure that compilation is optimized and with assertions disabled by default.
   66 CFLAGS=${CFLAGS:--O}
   67 CPPFLAGS=${CPPFLAGS:--DNDEBUG}
   68 
   69 # The default absolute pathname of the installed units database. "pkgdatadir"
   70 # isn't a configure-variable in the normal sense: it doesn't appear in 
   71 # "config.status" yet appears in "Makefile"; consequently, the following
   72 # nonsense just to avoid defining the pathname in the makefile so that Eclipse
   73 # is happy.
   74 pkgdatadir=$(eval echo $(eval echo `echo ${datadir}`/${PACKAGE}))
   75 AC_DEFINE_UNQUOTED([DEFAULT_UDUNITS2_XML_PATH], ["${pkgdatadir}/udunits2.xml"],
   76     [The default absolute pathname of the installed units database])
   77 
   78 # Checks for programs.
   79 AC_PROG_CC
   80 AM_PROG_CC_C_O
   81 #if test "$ac_cv_prog_cc_${ac_cc}_c_o" = yes; then
   82 #    case "$AM_CFLAGS" in
   83 #	"-g") ;;
   84 #	*) AM_CFLAGS="${AM_CFLAGS:+$AM_CFLAGS }-g";;
   85 #    esac
   86 #fi
   87 AC_PROG_CPP
   88 AC_PROG_INSTALL
   89 AC_PROG_LN_S
   90 AC_PROG_MAKE_SET
   91 AC_PROG_YACC
   92 AM_PROG_LEX
   93 AC_PROG_FC
   94 
   95 # NB: Solaris 10 doesn't support _XOPEN_SOURCE beyond 600
   96 AC_DEFINE([_XOPEN_SOURCE], [600], [Level of X/OPEN compliance])
   97 
   98 # Checks for libraries.
   99 AC_SEARCH_LIBS([dirname], [gen], , 
  100     AC_MSG_ERROR([cannot find function dirname]))
  101 AC_SEARCH_LIBS([log10], [m], , 
  102     AC_MSG_ERROR([cannot find function log10]))
  103 AC_SEARCH_LIBS([XML_StopParser], [expat], , 
  104     AC_MSG_ERROR([cannot find EXPAT function XML_StopParser]))
  105 
  106 AC_CHECK_LIB([dl], [dlopen])
  107 
  108 # Checks for header files.
  109 AC_HEADER_STDC
  110 AC_CHECK_HEADERS([float.h inttypes.h stddef.h stdlib.h string.h strings.h])
  111 
  112 # Checks for the CUNIT unit-testing package
  113 LD_CUNIT=
  114 AC_MSG_NOTICE([Checking for the CUNIT unit-testing package.])
  115 AC_CHECK_HEADER([CUnit/CUnit.h],
  116     [AC_CHECK_LIB([cunit], [CU_initialize_registry], [LD_CUNIT=-lcunit])])
  117 AC_SUBST([LD_CUNIT])
  118 if test "$LD_CUNIT"; then
  119     AC_MSG_NOTICE([CUNIT found.  Enabling unit-tests.])
  120 else
  121     AC_MSG_NOTICE([CUNIT not found.  Disabling unit-tests.])
  122 fi
  123 AM_CONDITIONAL([HAVE_CUNIT], [test "$LD_CUNIT"])
  124 
  125 # Checks for typedefs, structures, and compiler characteristics.
  126 AC_C_CONST
  127 AC_TYPE_SIZE_T
  128 
  129 # Checks for library functions.
  130 AC_CHECK_FUNCS([floor memmove memset modf pow strcasecmp strdup strpbrk])
  131 
  132 AC_PROG_LIBTOOL
  133 
  134 AC_CONFIG_FILES([Makefile
  135                  lib/Makefile
  136                  lib/xmlFailures/Makefile
  137                  lib/xmlSuccesses/Makefile
  138 		 prog/Makefile])
  139 AC_OUTPUT