"Fossies" - the Fresh Open Source Software Archive

Member "wcalc-2.5/configure.ac" (2 Jan 2015, 5679 Bytes) of package /linux/privat/wcalc-2.5.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.

    1 # Process this file with autoconf to produce a configure script.
    2 
    3 ## --------------------- ##
    4 ## Autoconf Requirements ##
    5 ## --------------------- ##
    6 AC_PREREQ(2.59)
    7 
    8 ## ---------------------------------- ##
    9 ## Autoconf / Automake Initialization ##
   10 ## ---------------------------------- ##
   11 AC_INIT([wcalc], [2.5], [kyle-wcalc@memoryhole.net])
   12 AC_CONFIG_AUX_DIR([config])
   13 AC_CONFIG_MACRO_DIR([config])
   14 AC_CONFIG_SRCDIR([src/cli/main.c])
   15 
   16 dnl Require at least AM 1.7.  Prior versions require AM_CONFIG_HEADER
   17 dnl and have no equivalent to AC_CONFIG_HEADERS (the plural version),
   18 dnl which is a pain.  AM 1.7 also added support for putting target
   19 dnl information in AM_CONDITIONAL blocks and using the += modifier.
   20 dnl ... removed "check-news" because of automatic version generation
   21 # Automake's silent rules were implemented in the same version that
   22 # color-tests was implemented, so we can use one to detect the other.
   23 # This nasty, dirty, unreliable trick is strongly discouraged by its author:
   24 # http://blog.flameeyes.eu/trackbacks?article_id=5155
   25 m4_ifdef([AM_SILENT_RULES],
   26 		 [m4_define([wc_color_tests], [color-tests])],
   27 		 [m4_define([wc_color_tests], [])])
   28 AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 no-define 1.7 ]wc_color_tests)
   29 # If Automake supports silent rules, enable them
   30 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
   31 
   32 
   33 AC_ARG_ENABLE([rpath],
   34 			  [AS_HELP_STRING([--enable-rpath],
   35 							  [Add -rpath arguments to LDFLAGS])])
   36 AC_ARG_ENABLE([picky],
   37               [AS_HELP_STRING([--enable-picky],
   38                               [turns on extra compiler warnings (for developers)])])
   39 AS_IF([test "x$enable_picky" = x],
   40       [AS_IF([test -d "${srcdir}/.svn"],
   41              [AC_MSG_NOTICE([--> developer override: enable picky compiler by default <--])
   42              enable_picky=yes])])
   43 
   44 # Checks for programs.
   45 AC_PROG_CC
   46 AC_PROG_CC_C99
   47 AC_PROG_RANLIB
   48 AC_PROG_YACC
   49 AM_PROG_LEX
   50 AS_IF([test "x$LEX" == x],
   51 	  [AC_MSG_ERROR([A Lex/Flex program is required in order to compile wcalc.])],
   52 	  [AS_IF([test "x$LEX" != xflex],
   53 			 [LEX="$SHELL $missing_dir/missing flex"
   54 			  AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy])
   55 			  AC_SUBST([LEXLIB], [''])]
   56 			 )]
   57 	  )
   58 AC_PROG_CPP
   59 AC_PROG_INSTALL
   60 
   61 AS_IF([test "x$enable_picky" = xyes],
   62 	  [CFLAGS="$CFLAGS -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes"])
   63 
   64 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112L"
   65 
   66 AC_CHECK_HEADERS([limits.h])
   67 AC_CHECK_DECL([PATH_MAX],
   68 			  [AC_DEFINE([HAVE_PATH_MAX], [1], [Have PATH_MAX])],
   69 			  [],
   70 			  [#ifdef HAVE_LIMITS_H
   71 			   #include <limits.h>
   72 			   #endif
   73 			   ])
   74 
   75 # Checks for libraries.
   76 AC_CHECK_LIB([m], [acos])
   77 AC_ARG_WITH([readline],
   78 			[AS_HELP_STRING([--without-readline],
   79 							[do not try to find and use the readline library])],
   80 			[nc_cv_readline=$withval],
   81 			[nc_cv_readline=yes])
   82 AS_IF([test "x$nc_cv_readline" = xyes],
   83 	  [VL_LIB_READLINE])
   84 
   85 #==========================================================================================
   86 # GMP
   87 #==========================================================================================
   88 AC_ARG_WITH([gmp],
   89 			[AS_HELP_STRING([--with-gmp=[[PATH]]],
   90 							[specify the path to the gmp library])],
   91 			[AS_IF([test "x$enable_rpath" = xyes],
   92 				   [GMP_CPPFLAGS="-I$with_gmp/include"
   93 					GMP_LDFLAGS="-L$with_gmp/lib -Wl,-rpath,$with_gmp/lib"],
   94 				   [GMP_CPPFLAGS="-I$with_gmp/include"
   95 					GMP_LDFLAGS="-L$with_gmp/lib"])])
   96 saved_CPPFLAGS="$CPPFLAGS"
   97 saved_LDFLAGS="$LDFLAGS"
   98 CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
   99 LDFLAGS="$GMP_LDFLAGS $LDFLAGS"
  100 AC_CHECK_LIB([gmp], [__gmpz_init], [],
  101 			 [AC_CHECK_LIB([gmp], [mpz_init], [],
  102 						   [AC_CHECK_LIB([gmp2], [mpz_init])])])
  103 CPPFLAGS="$saved_CPPFLAGS"
  104 LDFFLAGS="$saved_LDFLAGS"
  105 AC_SUBST(GMP_CPPFLAGS)
  106 AC_SUBST(GMP_LDFLAGS)
  107 
  108 #==========================================================================================
  109 # MPFR
  110 #==========================================================================================
  111 AC_ARG_WITH([mpfr],
  112 			[AS_HELP_STRING([--with-mpfr=[[PATH]]],
  113 							[specify the path to the mpfr library])],
  114 			[AS_IF([test "x$enable_rpath" = xyes],
  115 				   [MPFR_CPPFLAGS="-I$with_mpfr/include"
  116 					MPFR_LDFLAGS="-L$with_mpfr/lib -Wl,-rpath,$with_mpfr/lib"],
  117 				   [MPFR_CPPFLAGS="-I$with_mpfr/include"
  118 					MPFR_LDFLAGS="-L$with_mpfr/lib"])])
  119 saved_CPPFLAGS="$CPPFLAGS"
  120 saved_LDFLAGS="$LDFLAGS"
  121 CPPFLAGS="$MPFR_CPPFLAGS $GMP_CPPFLAGS $CPPFLAGS"
  122 LDFLAGS="$MPFR_LDFLAGS $GMP_LDFLAGS $LDFLAGS"
  123 AC_SEARCH_LIBS([mpfr_free_str], [mpfr],
  124 			   [AC_DEFINE([HAVE_LIBMPFR], [1], [Have libmpfr])],
  125 			   [AC_MSG_ERROR([Need MPFR 2.1.x or better. see http://www.mpfr.org])])
  126 AC_CHECK_FUNC([mpfr_sec],
  127 			  [AC_DEFINE([HAVE_MPFR_22], [1], [MPFR version 2.2 or better])])
  128 AC_SUBST(MPFR_CPPFLAGS)
  129 AC_SUBST(MPFR_LDFLAGS)
  130 CPPFLAGS="$saved_CPPFLAGS"
  131 LDFFLAGS="$saved_LDFLAGS"
  132 # what version of mpfr
  133 #==========================================================================================
  134 
  135 # Checks for header files.
  136 AC_HEADER_STDC
  137 AC_HEADER_SYS_WAIT
  138 AC_HEADER_TIME
  139 AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h stdio.h])
  140 
  141 # Checks for typedefs, structures, and compiler characteristics.
  142 AC_C_INLINE
  143 AC_C_CONST
  144 AC_TYPE_SIZE_T
  145 
  146 # Checks for library functions.
  147 AC_FUNC_MALLOC
  148 AC_FUNC_REALLOC
  149 AC_FUNC_VPRINTF
  150 AC_CHECK_FUNCS([gettimeofday memset modf pow stpcpy strchr strdup strerror strrchr strtoul])
  151 
  152 AC_CONFIG_HEADER([src/common/includes/config.h])
  153 AC_CONFIG_FILES([Makefile
  154 				 src/Makefile
  155 				 src/common/Makefile
  156 				 src/common/includes/Makefile
  157 				 src/gui/Makefile
  158                  test/Makefile
  159 				 English.lproj/Makefile])
  160 AC_OUTPUT
  161