*** empty log message ***
authorBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Mon, 6 Dec 2004 14:27:33 +0000 (14:27 +0000)
committerBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Mon, 6 Dec 2004 14:27:33 +0000 (14:27 +0000)
[r4575]

MakeTargets
Makefile.in
configure
configure.in
ir/common/statistics.c
ir/config/Makefile.in
ir/external/Makefile.in
ir/ir/Makefile.in
ir/opt/Makefile.in
testprograms/Makefile.in

index d355eaa..c57c018 100644 (file)
@@ -82,6 +82,9 @@ local_install_headers:
 ifneq ($(strip $(INSTALL_HEADERS)),)
        $(INSTALL)  -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS)) $(INCLUDEDIR)
 endif
+ifneq ($(strip $(INSTALL_GENERATED_HEADERS)),)
+       $(INSTALL)  -m u+rw,a+r $(INSTALL_GENERATED_HEADERS) $(INCLUDEDIR)
+endif
 ifneq ($(strip $(INSTALL_HEADERS_ADT)),)
        $(INSTALL)  -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS_ADT)) $(INCLUDEDIR)/adt
 endif
index 231062c..a86cffc 100644 (file)
@@ -21,9 +21,16 @@ topdir := .
 subdir := .
 # do we want statistics
 enable_statistics := @enable_statistics@
+# do we want external description of effects
+enable_external_effects := @enable_external_effects@
 
-build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/opt ir/tr ir/ana \
-       ir/stat ir/external ir/ana2
+ifeq (@enable_external_effects@,yes)
+build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
+               ir/opt ir/tr ir/ana ir/stat ir/ana2 ir/external
+else
+build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
+               ir/opt ir/tr ir/ana ir/stat ir/ana2
+endif
 
 subdirs := $(build_subdirs) ir/config
 
@@ -61,6 +68,7 @@ libfirm.a: $(XOFILES) $(OFILES)
        mv -f $@.new $@
        $(RANLIB) $@
 
+# dont know about xml here
 libfirm.so: subdir_all $(XOFILES) $(OFILES)
        ld -Bshareable -o ./libfirm.so $(XOFILES) -lm -L/usr/public/libxml2/lib -lxml2
 
index 96441a0..3c6f0d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -832,6 +832,7 @@ Optional Features:
   --enable-heapanalysis       Compile with heap analysis.
   --disable-libiberty     disable own libiberty parts
   --enable-statistics     enable Firm statistics
+  --disable-effects       disable descriptions of external effects in XML
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1214,14 +1215,14 @@ ac_output_file="Makefile MakeRules ir/Makefile ir/adt/Makefile ir/debug/Makefile
                testprograms/Makefile firmjni/Makefile firmjni/testprograms/Makefile \
                libfirm.doxygen"
 
-CONF_DIR_NAME=`dirname $0`
-
 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
@@ -1352,6 +1353,27 @@ 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'
@@ -3604,6 +3626,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
 
@@ -3676,6 +3822,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
@@ -4888,6 +5105,7 @@ s,@enable_firm_jni@,$enable_firm_jni,;t t
 s,@enable_heapanalysis@,$enable_heapanalysis,;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
index 76e4695..e687772 100644 (file)
@@ -25,9 +25,6 @@ ac_output_file="Makefile MakeRules ir/Makefile ir/adt/Makefile ir/debug/Makefile
                testprograms/Makefile firmjni/Makefile firmjni/testprograms/Makefile \
                libfirm.doxygen"
 
-dnl where is the configure file
-CONF_DIR_NAME=`dirname $0`
-
 dnl generate the config header file
 AC_CONFIG_HEADER(config.h)
 
@@ -35,6 +32,9 @@ dnl keep track of the environment set by the user
 libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS'}"
 AC_SUBST(libfirm_conf_env)
 
+dnl where is the configure file
+CONF_DIR_NAME=`dirname $0`
+
 dnl check for additional include dirs
 AC_ARG_WITH(includedir, [  --with-includedir=add colon seperated list of directories to include search path],
     CPPFLAGS=$CPPFLAGS" -I"`echo $withval|sed 's;\:; -I;g'`, T_FLAG="")
@@ -129,6 +129,24 @@ AC_ARG_ENABLE(statistics,
 fi])
 AC_SUBST(enable_statistics)
 
+dnl disable external effects in XML
+dnl -------------------------------
+AC_MSG_CHECKING([for using external effects in xml2])
+AC_ARG_ENABLE(external-effects,
+[  --disable-effects       disable descriptions of external effects in XML],
+[if test "$enableval"=no; then
+  enable_external_effects=no
+fi],
+[enable_external_effects=yes])
+AC_SUBST(enable_external_effects)
+if test "$enable_external_effects" == "no"; then
+  AC_MSG_RESULT([disabled])
+else
+  AC_MSG_RESULT([enabled])
+fi
+dnl check for header and library below
+
+
 dnl Checks for programs.
 dnl ====================
 
@@ -257,6 +275,13 @@ if test "$enable_firm_jni" = yes; then
 fi
 
 
+if test "$enable_external_effects" == "yes"; then
+  AC_CHECK_HEADERS(libxml/parser.h, ac_xml_headers="yes", ac_xml_headers="no")
+  if test "$ac_xml_headers" != yes; then
+    AC_MSG_ERROR(xml header files not found. (IPD: add --with-includedir=/usr/public/libxml2/include/libxml2/ to configure flags))
+  fi
+fi
+
 dnl Checks for libraries.
 dnl =====================
 
@@ -276,6 +301,15 @@ if test "$ac_m_library" != yes; then
 fi
 
 
+if test "$enable_external_effects" == "yes"; then
+  AC_CHECK_LIB(xml2, xmlParseFile, ac_xml_library="yes", ac_xml_library="no")
+  if test "$ac_m_library" != yes; then
+    AC_MSG_ERROR("xml2 library not found (IPD: add --with-libdir=/usr/public/libxml2/lib/ to configure flags)")
+  else
+    LIBS=$LIBS" -lxml2"
+  fi
+fi
+
 dnl Checks for typedefs, structures, and compiler characteristics.
 dnl ==============================================================
 AC_C_CONST
index 1138295..89c2e05 100644 (file)
  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "statistics.h"
 #include "irgraph_t.h"
 #include "irnode_t.h"
index 341599d..fd920b7 100644 (file)
@@ -15,9 +15,10 @@ srcdir = @srcdir@
 topdir = ../..
 subdir := ir/common
 
-INSTALL_HEADERS := firm_config.h
+# generated header file
+INSTALL_GENERATED_HEADERS := firm_config.h
 
-SOURCES = $(INSTALL_HEADERS)
+SOURCES = $(INSTALL_GENERATED_HEADERS)
 
 include $(topdir)/MakeRules
 
index e589779..8ce551d 100644 (file)
 # Licence:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 #
 
-# set LIBXML2 to the installation directory of libxml2
-# temporary fix until libxml2 is integrated:
-LIBXML2                ?= /usr/public/libxml2
-
 top_srcdir := @top_srcdir@
 srcdir = @srcdir@
 topdir = ../..
@@ -31,7 +27,7 @@ include $(topdir)/MakeRules
 CPPFLAGS +=    -I$(top_srcdir)/ir/adt   -I$(top_srcdir)/ir/ir  -I$(top_srcdir)/ir/common  \
                -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr  -I$(top_srcdir)/ir/tv \
                -I$(top_srcdir)/ir/debug -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st \
-               -I$(top_srcdir)/ir/stat  -I$(topdir)/ir/config -I$(LIBXML2)/include/libxml2
+               -I$(top_srcdir)/ir/stat  -I$(topdir)/ir/config
 
 include $(top_srcdir)/MakeTargets
 
index 8820062..7e742a5 100644 (file)
@@ -17,8 +17,8 @@ subdir := ir/ir
 
 INSTALL_HEADERS = irprog.h irgraph.h irnode.h irmode.h irop.h ircons.h \
                irflag.h irvrfy.h irgwalk.h irgmod.h iropt.h irdump.h   \
-               irgopt.h ircgcons.h ircgopt.h irreflect.h irarch.h irprintf.h \
-               irlwrdw.h
+               irgopt.h ircgcons.h ircgopt.h irreflect.h irarch.h irprintf.h
+
 
 SOURCES = $(INSTALL_HEADERS)
 
@@ -26,8 +26,8 @@ SOURCES +=    Makefile.in \
                ircons.c ircons_t.h irgmod.c irgraph_t.h irnode.c iropt.c iropt_t.h irvrfy.c \
                irgwalk.c irgwalk_blk.c irdump.c irdumptxt.c irgopt.c irgopt_t.h irnode_t.h     \
                irmode.c irop.c irprog.c irflag.c irflag_t.h irgraph.c irprintf_t.h \
-               irmode_t.h irop_t.h irprog_t.h ircgcons.c ircgopt.c irreflect.c irarch.c irprintf.c \
-               irlwrdw.c
+               irmode_t.h irop_t.h irprog_t.h ircgcons.c ircgopt.c irreflect.c irarch.c irprintf.c
+
 
 include $(topdir)/MakeRules
 
index b5bd66e..63ec1b8 100644 (file)
@@ -22,7 +22,8 @@ SOURCES = $(INSTALL_HEADERS)
 
 SOURCES +=     Makefile.in \
                cfopt.c tailrec.c strength_red.c ldstopt.c reassoc.c \
-               loop_unrolling.c funccall.c
+               loop_unrolling.c
+
 
 include $(topdir)/MakeRules
 
index f6bf6d3..da12382 100644 (file)
@@ -1,4 +1,3 @@
-
 #
 # Project:     libFIRM
 # File name:   testprograms/Makefile.in
@@ -62,7 +61,7 @@ CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/
 
 LDFLAGS = -L$(topdir)
 LDFLAGS+= @LDFLAGS@
-LDLIBS += -lfirm -liberty -L/usr/public/libxml2 -lxml2
+LDLIBS += -lfirm -liberty @LIBS@
 # @@@ TODO replace hand crafted stuff (xml2) for configure
 
 GENFILES := $(bin_EXAMPLES) *.vcg