1 dnl AUTOCONF configuration for CLN
2 dnl Bruno Haible 8.1.1999
4 dnl configure.in ---<autoconf>--->> configure
6 dnl configure ---<sh>--->> config.status
7 dnl --->> include/cl_config.h
8 dnl Makefile.in --->> Makefile
9 dnl src/Makefile.in --->> src/Makefile
11 dnl Makefile ---<make>--->> libcln.a
14 AC_INIT(src/integer/gcd/cl_I_gcd.cc)
15 AC_CONFIG_HEADER(include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h)
17 dnl This piece of sed script replaces every line containing '@subdir@'
18 dnl by several consecutive lines, each referencing one subdir.
29 s/@subdir@/benchmarks/
41 dnl checks for programs
50 dnl sets variable CXXCPP
52 dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE
54 dnl sets variable RANLIB
56 dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
58 dnl check for host type
60 CL_CANONICAL_HOST(autoconf)
61 dnl sets variables host, host_cpu, host_vendor, host_os
63 dnl DEFS __${host_cpu}__
65 dnl check for build configuration
70 dnl sets variable LIBTOOL
72 dnl checks for compiler characteristics
77 dnl DEFS HAVE_BOOL, bool
79 dnl DEFS HAVE_LONGLONG
81 dnl DEFS HAVE_LONGDOUBLE
83 dnl DEFS HAVE_TEMPLATE_NULL
84 CL_GLOBAL_CONSTRUCTORS
85 dnl DEFS CL_GLOBAL_CONSTRUCTOR_PREFIX, CL_GLOBAL_DESTRUCTOR_PREFIX
87 dnl checks for header files
90 dnl DEFS HAVE_UNISTD_H if exist unistd.h
92 dnl checks for typedefs
95 dnl checks for functions and declarations
98 dnl set variable ALLOCA, DEFS NO_ALLOCA
100 dnl DEFS HAVE_FPU_CONTROL_T, HAVE_SETFPUCW
102 dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T
106 dnl DEFS HAVE_TIMES_CLOCK
108 dnl DEFS HAVE_SYS_RESOURCE_H, HAVE_GETRUSAGE, HAVE_SYS_TIMES_H
110 dnl DEFS HAVE_PERROR_DECL
112 dnl checks for compiler characteristics
115 dnl DEFS __CHAR_UNSIGNED__ if char is unsigned
116 test -d 'include' || mkdir 'include'
117 CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,include/cl_intparam.h,cl_cv_file_intparam_h)
118 dnl builds include/cl_intparam.h
119 CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,include/cl_floatparam.h,cl_cv_file_floatparam_h)
120 dnl builds include/cl_floatparam.h
122 dnl interfacing to GNU gmp
124 AC_ARG_WITH(gmp, [ --with-gmp use fast GNU gmp low-level functions])
125 if test -z "$with_gmp"; then
126 if test -d "${srcdir}/gmp"; then
132 if test "$with_gmp" = yes; then
133 AC_DEFINE(CL_USE_GMP)
134 GMP_INCLUDES='-I$(top_srcdir)/gmp'
135 GMP_OBJDEPS='../gmp/mpn/libmpn.la'
136 GMP_OBJS='../gmp/mpn/*.lo ../gmp/*.lo'
142 AC_SUBST(GMP_INCLUDES)
143 AC_SUBST(GMP_OBJDEPS)
148 for f in 'tests/.gdbinit'; do
149 if test '!' -f "$f"; then
152 g=`echo "$f" | sed -e 's,/[^/]*$,,'`
154 test "$g" = "$f" || test -d "$g" || mkdir "$g"
158 AC_OUTPUT(Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile)
159 if test "$with_gmp" = yes; then
160 AC_OUTPUT_SUBDIRS(gmp)