removed entity_visited flag - use type_visited instead
[libfirm] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl Copyright (c) 2001 IPD, Universität Karlsruhe (TH)
3
4 dnl libFIRM Project
5 dnl $Id$
6
7 AC_REVISION($Id$)
8
9
10 AC_INIT(ir/ir/ircons.c)
11
12 dnl if other files should be generated just add them to ac_output_files
13 ac_output_file="Makefile MakeRules ir/Makefile ir/adt/Makefile ir/debug/Makefile \
14                 ir/tv/Makefile ir/common/Makefile ir/ident/Makefile ir/ir/Makefile \
15                 ir/ana/Makefile ir/tr/Makefile ir/st/Makefile testprograms/Makefile"
16
17 dnl generate the config header file
18 AC_CONFIG_HEADER(config.h)
19
20 dnl keep track of the environment set by the user
21 libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS'}"
22 AC_SUBST(libfirm_conf_env)
23
24
25 dnl Package options
26 dnl ===============
27
28 dnl set debugging
29 dnl -------------
30 AC_ARG_ENABLE(debug,
31 [  --enable-debug          enable assertions and additional debugging routines],
32 [if test "$enableval" = yes; then
33   AC_DEFINE(DEBUG_libfirm)
34 else
35   AC_DEFINE(NDEBUG)
36 fi])
37 AC_SUBST(enable_debug_libfirm)
38
39
40 AC_ARG_ENABLE(gcc_inline,
41 [  --enable-gcc_inline     enable gcc inline C-extension],
42 [if test "$enableval" = yes; then
43   AC_DEFINE(USE_GCC_INLINE)
44 fi])
45 AC_SUBST(enable_gcc_inline)
46
47
48 dnl set profiling
49 dnl -------------
50 AC_ARG_ENABLE(profile,
51 [  --enable-profile        enable profiling],
52 [if test "$enableval"=yes; then
53   enable_profile_libfirm=yes
54 fi],
55 [enable_profile_libfirm=no])
56 AC_SUBST(enable_profile_libfirm)
57
58 dnl set auto documentation
59 dnl ----------------------
60 AC_ARG_ENABLE(autodoc,
61 [  --enable-autodoc        enable auto documentation],
62 [if test "$enableval"=yes; then
63   enable_auto_documentation=yes
64 fi],
65 [enable_auto_documentation=no])
66 AC_SUBST(enable_auto_documentation)
67
68
69 dnl Checks for programs.
70 dnl ====================
71
72 dnl check for a C compiler
73 dnl ----------------------
74 AC_PROG_CC
75
76 dnl check for prelinkable linker
77 dnl ----------------------------
78 LIBFIRM_PROG_LD_R
79 if test "$libfirm_cv_prog_ld_r" != "yes"; then
80   AC_MSG_ERROR(need a prelinkcapable linker)
81 fi
82
83 dnl check for ar
84 dnl ------------
85 AC_CHECK_PROG(AR, ar, "ar", "")
86 if test "$AR" != "ar"; then
87   AC_MSG_ERROR(need ar for creating archives)
88 fi
89
90 dnl check for tar
91 dnl -------------
92 AC_CHECK_PROG(TAR, tar, "tar", "")
93 if test "$TAR" != "tar"; then
94   AC_MSG_ERROR(need tar for creating archives in distribution)
95 fi
96
97 dnl check wether ar can handle option -s
98 dnl if not then ranlib is needed
99 dnl for simpliticity we use ranlib every time
100
101 AC_PROG_RANLIB
102
103 AC_PROG_INSTALL
104
105 AC_PROG_LN_S
106
107 dnl check for robodoc if enabled
108 dnl ----------------------------
109 if test "$enable_auto_documentation" = yes; then
110   AC_CHECK_PROG(ROBODOC, robodoc, "robodoc", "")
111   if test "$ROBODOC" != "robodoc"; then
112     AC_MSG_ERROR(need robodoc for auto documentation (IPD: module add robodoc))
113   fi
114 fi
115
116 dnl Checks for header files.
117 dnl ========================
118
119 AC_HEADER_STDC
120
121 dnl check for the math header file
122
123 AC_CHECK_HEADERS(math.h, ac_math_headers="yes", ac_math_headers="no")
124 if test "$ac_math_headers" != yes; then
125   dnl math header not found.
126   AC_MSG_ERROR("math header file not found")
127 fi
128
129
130 dnl check for the gnu multiprecission (gmp) header file
131
132 AC_CHECK_HEADERS(gmp.h, ac_gmp_headers="yes", ac_gmp_headers="no")
133 if test "$ac_gmp_headers" != yes; then
134   dnl gmp header not found.
135   AC_MSG_ERROR("GNU multiprecission gmp header file not found")
136 fi
137
138
139 dnl check for the obstack header file
140
141 AC_CHECK_HEADERS(obstack.h, ac_obstack_headers="yes", ac_obstack_headers="no")
142 if test "$ac_obstack_headers" != yes; then
143   dnl obstack header not found.
144   AC_MSG_ERROR("obstack header file not found")
145 fi
146
147
148 dnl Checks for libraries.
149 dnl =====================
150
151 dnl check for the gnu multiprecission (gmp) library
152
153 AC_CHECK_LIB(gmp, main, ac_gmp_library="yes", ac_gmp_library="no")
154 if test "$ac_gmp_library" != yes; then
155   dnl gmp library not found.
156   AC_MSG_ERROR("GNU multiprecission gmp library not found")
157 fi
158
159
160 AC_CHECK_LIB(m, main, ac_m_library="yes", ac_m_library="no")
161 if test "$ac_m_library" != yes; then
162   dnl std math library not found.
163   AC_MSG_ERROR("standard math library not found")
164 fi
165
166
167 dnl Checks for typedefs, structures, and compiler characteristics.
168 dnl ==============================================================
169
170
171 dnl Checks for library functions.
172 dnl =============================
173
174 dnl check for strerror
175
176 AC_CHECK_FUNC(strerror,,
177   AC_MSG_ERROR("need strerror function")
178 )
179
180
181 dnl Error messaging
182 dnl ===============
183
184
185 AC_OUTPUT($ac_output_file,[ touch stamp-h ])