]> www.ginac.de Git - cln.git/blob - configure.in
- src/base/digitseq/cl_asm_mips_.cc: Starting at argument 5 the
[cln.git] / configure.in
1 dnl  AUTOCONF configuration for CLN
2 dnl  Bruno Haible 8.1.1999
3 dnl
4 dnl  configure.in ---<autoconf>--->> configure
5 dnl
6 dnl  configure    ---<sh>--->> config.status
7 dnl                      --->> include/cl_config.h
8 dnl          Makefile.in --->> Makefile
9 dnl      src/Makefile.in --->> src/Makefile
10 dnl
11 dnl  Makefile   ---<make>--->> libcln.a
12 dnl
13 dnl
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)
16 AC_PROG_MAKE_SET
17 dnl This piece of sed script replaces every line containing '@subdir@'
18 dnl by several consecutive lines, each referencing one subdir.
19 extrasub="$extrasub"'
20 /@subdir@/{
21 h
22 g
23 s/@subdir@/src/
24 p
25 g
26 s/@subdir@/tests/
27 p
28 g
29 s/@subdir@/benchmarks/
30 p
31 g
32 s/@subdir@/examples/
33 p
34 g
35 s/@subdir@/doc/
36 p
37 d
38 }
39 '
40 dnl
41 dnl           checks for programs
42 dnl
43 AC_PROG_CC
44                       dnl sets variable CC
45 AC_PROG_CPP
46                       dnl sets variable CPP
47 AC_PROG_CXX
48                       dnl sets variable CXX
49 AC_PROG_CXXCPP
50                       dnl sets variable CXXCPP
51 CL_AS_UNDERSCORE
52                       dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE
53 CL_PROG_RANLIB
54                       dnl sets variable RANLIB
55 CL_PROG_INSTALL
56                       dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
57 dnl
58 dnl           check for host type
59 dnl
60 CL_CANONICAL_HOST(autoconf)
61                       dnl sets variables host, host_cpu, host_vendor, host_os
62 CL_CANONICAL_HOST_CPU
63                       dnl DEFS __${host_cpu}__
64 dnl
65 dnl           check for build configuration
66 dnl
67 PACKAGE=cln
68 AM_DISABLE_SHARED
69 AM_PROG_LIBTOOL
70                       dnl sets variable LIBTOOL
71 dnl
72 dnl           checks for compiler characteristics
73 dnl
74 AC_LANG_CPLUSPLUS
75 dnl
76 CL_BOOL
77                       dnl DEFS HAVE_BOOL, bool
78 CL_LONGLONG
79                       dnl DEFS HAVE_LONGLONG
80 CL_LONGDOUBLE
81                       dnl DEFS HAVE_LONGDOUBLE
82 CL_TEMPLATE_NULL
83                       dnl DEFS HAVE_TEMPLATE_NULL
84 CL_GLOBAL_CONSTRUCTORS
85                       dnl DEFS CL_GLOBAL_CONSTRUCTOR_PREFIX, CL_GLOBAL_DESTRUCTOR_PREFIX
86 dnl
87 dnl           checks for header files
88 dnl
89 CL_UNISTD_H
90                       dnl DEFS HAVE_UNISTD_H if exist unistd.h
91 dnl
92 dnl           checks for typedefs
93 dnl
94 dnl
95 dnl           checks for functions and declarations
96 dnl
97 CL_ALLOCA
98                       dnl set variable ALLOCA, DEFS NO_ALLOCA
99 CL_FPU_CONTROL
100                       dnl DEFS HAVE_FPU_CONTROL_T, HAVE_SETFPUCW
101 CL_GETTIMEOFDAY
102                       dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T
103 CL_FTIME
104                       dnl DEFS HAVE_FTIME
105 CL_TIMES_CLOCK
106                       dnl DEFS HAVE_TIMES_CLOCK
107 CL_RUSAGE
108                       dnl DEFS HAVE_SYS_RESOURCE_H, HAVE_GETRUSAGE, HAVE_SYS_TIMES_H
109 CL_PERROR
110                       dnl DEFS HAVE_PERROR_DECL
111 dnl
112 dnl           checks for compiler characteristics
113 dnl
114 CL_CHAR_UNSIGNED
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
121 dnl
122 dnl           interfacing to GNU gmp
123 dnl
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
127     with_gmp=yes
128   else
129     with_gmp=no
130   fi
131 fi
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'
137 else
138   GMP_INCLUDES=''
139   GMP_OBJDEPS=''
140   GMP_OBJS=''
141 fi
142 AC_SUBST(GMP_INCLUDES)
143 AC_SUBST(GMP_OBJDEPS)
144 AC_SUBST(GMP_OBJS)
145 dnl
146 dnl           That's it.
147 dnl
148 for f in 'tests/.gdbinit'; do
149   if test '!' -f "$f"; then
150     echo "creating $f"
151 changequote(,)dnl
152     g=`echo "$f" | sed -e 's,/[^/]*$,,'`
153 changequote([,])dnl
154     test "$g" = "$f" || test -d "$g" || mkdir "$g"
155     cp "$srcdir/$f" "$f"
156   fi
157 done
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)
161 fi