typos fixed
[libfirm] / configure
index 337ea29..eef89c4 100755 (executable)
--- a/configure
+++ b/configure
@@ -829,9 +829,11 @@ Optional Features:
   --enable-profile        enable profiling
   --enable-autodoc        enable auto documentation
   --enable-firmjni        check for tools necesarry to construct a java native interface for Firm
-  --enable-heapanalysis       Compile with heap analysis.
+  --enable-heapanalysis   Compile with heap analysis.
+  --enable-backend        Compile with backend facility.
   --disable-libiberty     disable own libiberty parts
   --enable-statistics     enable Firm statistics
+  --disable-external-effects  disable descriptions of external effects in XML
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1209,9 +1211,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_output_file="Makefile MakeRules ir/Makefile ir/adt/Makefile ir/debug/Makefile \
                ir/tv/Makefile ir/common/Makefile ir/ident/Makefile ir/ir/Makefile \
-               ir/ana/Makefile ir/tr/Makefile ir/st/Makefile ir/stat/Makefile \
-               ir/opt/Makefile  ir/external/Makefile \
+               ir/ana/Makefile ir/tr/Makefile ir/ana2/Makefile ir/stat/Makefile \
+               ir/opt/Makefile ir/external/Makefile ir/config/Makefile \
                testprograms/Makefile firmjni/Makefile firmjni/testprograms/Makefile \
+               ir/be/Makefile \
                libfirm.doxygen"
 
 ac_config_headers="$ac_config_headers config.h"
@@ -1220,13 +1223,13 @@ ac_config_headers="$ac_config_headers config.h"
 libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS'}"
 
 
+CONF_DIR_NAME=`dirname $0`
+
 
 # Check whether --with-includedir or --without-includedir was given.
 if test "${with_includedir+set}" = set; then
   withval="$with_includedir"
   CPPFLAGS=$CPPFLAGS" -I"`echo $withval|sed 's;\:; -I;g'`
-else
-  T_FLAG=""
 fi;
 
 
@@ -1234,8 +1237,6 @@ fi;
 if test "${with_libdir+set}" = set; then
   withval="$with_libdir"
   LDFLAGS=$LDFLAGS" -L"`echo $withval|sed 's;\:; -L;g'`
-else
-  T_FLAG=""
 fi;
 
 
@@ -1307,6 +1308,8 @@ else
 fi;
 
 
+echo "$as_me:$LINENO: checking for heapanalysis" >&5
+echo $ECHO_N "checking for heapanalysis... $ECHO_C" >&6
 # Check whether --enable-heapanalysis or --disable-heapanalysis was given.
 if test "${enable_heapanalysis+set}" = set; then
   enableval="$enable_heapanalysis"
@@ -1315,16 +1318,30 @@ else
   enable_heapanalysis="no"
 fi;
 if test "$enable_heapanalysis" = "no"; then
-  echo "$as_me:$LINENO: result: heapanalysis disabled" >&5
-echo "${ECHO_T}heapanalysis disabled" >&6
+  echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
 else
   cat >>confdefs.h <<\_ACEOF
 #define DO_HEAPANALYSIS 1
 _ACEOF
 
-  echo "$as_me:$LINENO: result: heapanalysis enabled" >&5
-echo "${ECHO_T}heapanalysis enabled" >&6
+  echo "$as_me:$LINENO: result: enabled" >&5
+echo "${ECHO_T}enabled" >&6
+fi
+
+
+# Check whether --enable-backend or --disable-backend was given.
+if test "${enable_backend+set}" = set; then
+  enableval="$enable_backend"
+  if test "$enableval" = "yes"; then
+  cat >>confdefs.h <<\_ACEOF
+#define FIRM_BACKEND 1
+_ACEOF
+
 fi
+else
+  enable_backend="yes"
+fi;
 
 
 # Check whether --enable-libiberty or --disable-libiberty was given.
@@ -1350,6 +1367,26 @@ fi
 fi;
 
 
+echo "$as_me:$LINENO: checking for using external effects in xml2" >&5
+echo $ECHO_N "checking for using external effects in xml2... $ECHO_C" >&6
+# Check whether --enable-external-effects or --disable-external-effects was given.
+if test "${enable_external_effects+set}" = set; then
+  enableval="$enable_external_effects"
+  if test "$enableval"="no"; then
+  enable_external_effects=no
+fi
+else
+  enable_external_effects=yes
+fi;
+
+if test "$enable_external_effects" == no; then
+  echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
+else
+  echo "$as_me:$LINENO: result: enabled" >&5
+echo "${ECHO_T}enabled" >&6
+fi
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2498,8 +2535,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 touch tmp-install.a tmp-install.b
-if eval "$INSTALL -C tmp-install.a tmp-install.b" ; then
-    INSTALL="$INSTALL -C"
+if eval "$INSTALL tmp-install.a tmp-install.b" ; then
+    INSTALL="$INSTALL"
 fi
 rm tmp-install.a tmp-install.b
 
@@ -3602,6 +3639,130 @@ echo "$as_me: error: jni header file not found. (IPD: add --with-includedir=/usr
 fi
 
 
+if test "$enable_external_effects" == "yes"; then
+
+for ac_header in libxml/parser.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_xml_headers="yes"
+else
+  ac_xml_headers="no"
+fi
+
+done
+
+  if test "$ac_xml_headers" != yes; then
+    { { echo "$as_me:$LINENO: error: xml header files not found. (IPD: add --with-includedir=/usr/public/libxml2/include/libxml2/ to configure flags)" >&5
+echo "$as_me: error: xml header files not found. (IPD: add --with-includedir=/usr/public/libxml2/include/libxml2/ to configure flags)" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
 
 #dnl check for the gnu multiprecission (gmp) library
 
@@ -3674,6 +3835,77 @@ echo "$as_me: error: \"standard math library not found\"" >&2;}
 fi
 
 
+if test "$enable_external_effects" == "yes"; then
+  echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
+echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6
+if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lxml2  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char xmlParseFile ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+xmlParseFile ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_xml2_xmlParseFile=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_xml2_xmlParseFile=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
+echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6
+if test $ac_cv_lib_xml2_xmlParseFile = yes; then
+  ac_xml_library="yes"
+else
+  ac_xml_library="no"
+fi
+
+  if test "$ac_m_library" != yes; then
+    { { echo "$as_me:$LINENO: error: \"xml2 library not found (IPD: add --with-libdir=/usr/public/libxml2/lib/ to configure flags)\"" >&5
+echo "$as_me: error: \"xml2 library not found (IPD: add --with-libdir=/usr/public/libxml2/lib/ to configure flags)\"" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    LIBS=$LIBS" -lxml2"
+  fi
+fi
+
 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_stdc+set}" = set; then
@@ -4884,8 +5116,10 @@ s,@enable_profile_libfirm@,$enable_profile_libfirm,;t t
 s,@enable_auto_documentation@,$enable_auto_documentation,;t t
 s,@enable_firm_jni@,$enable_firm_jni,;t t
 s,@enable_heapanalysis@,$enable_heapanalysis,;t t
+s,@enable_backend@,$enable_backend,;t t
 s,@disable_libiberty@,$disable_libiberty,;t t
 s,@enable_statistics@,$enable_statistics,;t t
+s,@enable_external_effects@,$enable_external_effects,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@LDFLAGS@,$LDFLAGS,;t t
@@ -5412,3 +5646,6 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || { (exit 1); exit 1; }
 fi
+
+
+gawk -f $CONF_DIR_NAME/filter.awk < config.h | sed -f $CONF_DIR_NAME/filter.sed > ir/config/firm_config.h