added changes form Boris Boesler:
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 26 Oct 2005 13:06:34 +0000 (13:06 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 26 Oct 2005 13:06:34 +0000 (13:06 +0000)
Ich habe das configure.in so ge��ndert, da�� das das
Tool xml2-config benutzt wird, um die Pfade f��r libxml2 herauszukriegen,
und auf awk zu testen.

[r6813]

configure
configure.in

index 9be332f..72029ba 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in Id: configure.in.
+# From configure.in Id: configure.in 2 2005-10-20 14:40:41Z boesler .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for libfirm 0.3.0.
+# Generated by GNU Autoconf 2.59 for libfirm 1.3.0.
 #
 # Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
@@ -268,8 +268,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='libfirm'
 PACKAGE_TARNAME='libfirm'
-PACKAGE_VERSION='0.3.0'
-PACKAGE_STRING='libfirm 0.3.0'
+PACKAGE_VERSION='1.3.0'
+PACKAGE_STRING='libfirm 1.3.0'
 PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libfirm_conf_env plugin_subdirs enable_debug_libfirm enable_profile_libfirm enable_auto_documentation enable_firm_jni enable_heapanalysis disable_libiberty enable_statistics enable_libcore enable_external_effects CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LD ac_ct_LD libfirm_cv_prog_ld_r AR TAR RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S DOXYGEN DOT JAVAC JAVAH CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libfirm_conf_env plugin_subdirs XML2CONFIG enable_debug_libfirm enable_profile_libfirm enable_auto_documentation enable_firm_jni enable_heapanalysis disable_libiberty enable_statistics enable_libcore enable_external_effects CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AWK LD ac_ct_LD libfirm_cv_prog_ld_r AR TAR RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S DOXYGEN DOT JAVAC JAVAH CPP EGREP LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -778,7 +778,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libfirm 0.3.0 to adapt to many kinds of systems.
+\`configure' configures libfirm 1.3.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -835,7 +835,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libfirm 0.3.0:";;
+     short | recursive ) echo "Configuration of libfirm 1.3.0:";;
    esac
   cat <<\_ACEOF
 
@@ -861,7 +861,6 @@ Optional Packages:
   --with-plugins=list     include external libfirm plugins list (space separated)
   --with-includedir=add   colon seperated list of directories to include search path
   --with-libdir=add       colon seperated list of directories to linker search path
-  --with-libxml2=prefix   installation prefix of libxml2 (IPD: --with-libxml2=/usr/public/libxml2)
 
 Some influential environment variables:
   CC          C compiler command
@@ -970,7 +969,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-libfirm configure 0.3.0
+libfirm configure 1.3.0
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -984,7 +983,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libfirm $as_me 0.3.0, which was
+It was created by libfirm $as_me 1.3.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1326,7 +1325,7 @@ 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/ana2/Makefile ir/stat/Makefile \
                ir/opt/Makefile ir/external/Makefile ir/config/Makefile \
-               ir/arch/Makefile \
+               ir/arch/Makefile ir/lower/Makefile \
                testprograms/Makefile firmjni/Makefile firmjni/testprograms/Makefile \
                libfirm.doxygen"
 
@@ -1383,12 +1382,50 @@ if test "${with_libdir+set}" = set; then
 fi;
 
 
-# Check whether --with-libxml2 or --without-libxml2 was given.
-if test "${with_libxml2+set}" = set; then
-  withval="$with_libxml2"
-  LDFLAGS=$LDFLAGS" -L"$withval"/lib";
-       CPPFLAGS=$CPPFLAGS" -I"$withval"/include/libxml2"
-fi;
+# Extract the first word of "xml2-config", so it can be a program name with args.
+set dummy xml2-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_XML2CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$XML2CONFIG"; then
+  ac_cv_prog_XML2CONFIG="$XML2CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_XML2CONFIG=""xml2-config""
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_XML2CONFIG" && ac_cv_prog_XML2CONFIG=""echo""
+fi
+fi
+XML2CONFIG=$ac_cv_prog_XML2CONFIG
+if test -n "$XML2CONFIG"; then
+  echo "$as_me:$LINENO: result: $XML2CONFIG" >&5
+echo "${ECHO_T}$XML2CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$XML2CONFIG" != "xml2-config"; then
+  { { echo "$as_me:$LINENO: error: xml2-config for detecting libxml2 not found" >&5
+echo "$as_me: error: xml2-config for detecting libxml2 not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+LDFLAGS=$LDFLAGS" -L/usr/lib `$XML2CONFIG --libs`";
+CPPFLAGS=$CPPFLAGS" `$XML2CONFIG --cflags`";
 
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
@@ -2501,6 +2538,47 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+
 
 if test -z "$LD"; then
   if test -n "$ac_tool_prefix"; then
@@ -5557,7 +5635,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by libfirm $as_me 0.3.0, which was
+This file was extended by libfirm $as_me 1.3.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5620,7 +5698,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-libfirm config.status 0.3.0
+libfirm config.status 1.3.0
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -5813,6 +5891,7 @@ s,@ECHO_T@,$ECHO_T,;t t
 s,@LIBS@,$LIBS,;t t
 s,@libfirm_conf_env@,$libfirm_conf_env,;t t
 s,@plugin_subdirs@,$plugin_subdirs,;t t
+s,@XML2CONFIG@,$XML2CONFIG,;t t
 s,@enable_debug_libfirm@,$enable_debug_libfirm,;t t
 s,@enable_profile_libfirm@,$enable_profile_libfirm,;t t
 s,@enable_auto_documentation@,$enable_auto_documentation,;t t
@@ -5829,6 +5908,7 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
 s,@ac_ct_CC@,$ac_ct_CC,;t t
 s,@EXEEXT@,$EXEEXT,;t t
 s,@OBJEXT@,$OBJEXT,;t t
+s,@AWK@,$AWK,;t t
 s,@LD@,$LD,;t t
 s,@ac_ct_LD@,$ac_ct_LD,;t t
 s,@libfirm_cv_prog_ld_r@,$libfirm_cv_prog_ld_r,;t t
@@ -6458,4 +6538,4 @@ if test "$no_create" != yes; then
 fi
 
 
-gawk -f $CONF_DIR_NAME/filter.awk < config.h | sed -f $CONF_DIR_NAME/filter.sed > ir/config/firm_config.h
+$AWK -f $CONF_DIR_NAME/filter.awk < config.h | sed -f $CONF_DIR_NAME/filter.sed > ir/config/firm_config.h
index 4bca26d..ebc2016 100644 (file)
@@ -13,7 +13,7 @@ dnl
 
 AC_REVISION($Id$)
 
-AC_INIT(libfirm,0.3.0)
+AC_INIT(libfirm,1.3.0)
 AC_PREREQ(2.50)
 
 dnl if other files should be generated just add them to ac_output_files
@@ -21,7 +21,7 @@ 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/ana2/Makefile ir/stat/Makefile \
                ir/opt/Makefile ir/external/Makefile ir/config/Makefile \
-               ir/arch/Makefile \
+               ir/arch/Makefile ir/lower/Makefile \
                testprograms/Makefile firmjni/Makefile firmjni/testprograms/Makefile \
                libfirm.doxygen"
 
@@ -71,9 +71,18 @@ AC_ARG_WITH(libdir, [  --with-libdir=add       colon seperated list of directori
     LDFLAGS=$LDFLAGS" -L"`echo $withval|sed 's;\:; -L;g'`)
 
 dnl check for libxml2 library installation dir
-AC_ARG_WITH(libxml2, [  --with-libxml2=prefix   installation prefix of libxml2 (IPD: --with-libxml2=/usr/public/libxml2)],
-    LDFLAGS=$LDFLAGS" -L"$withval"/lib";
-       CPPFLAGS=$CPPFLAGS" -I"$withval"/include/libxml2")
+dnl AC_ARG_WITH(libxml2, [  --with-libxml2=prefix   installation prefix of libxml2 (IPD: --with-libxml2=/usr/public/libxml2)],
+dnl     LDFLAGS=$LDFLAGS" -L"$withval"/lib";
+dnl    CPPFLAGS=$CPPFLAGS" -I"$withval"/include/libxml2")
+
+dnl check for libxml2 library installation dir
+AC_CHECK_PROG(XML2CONFIG, xml2-config, "xml2-config", "echo")
+if test "$XML2CONFIG" != "xml2-config"; then
+  AC_MSG_ERROR(xml2-config for detecting libxml2 not found)
+fi
+AC_SUBST(XML2CONFIG)
+LDFLAGS=$LDFLAGS" -L/usr/lib `$XML2CONFIG --libs`";
+CPPFLAGS=$CPPFLAGS" `$XML2CONFIG --cflags`";
 
 dnl set debugging
 dnl -------------
@@ -212,6 +221,10 @@ dnl check for a C compiler
 dnl ----------------------
 AC_PROG_CC
 
+dnl check for awk
+dnl -------------
+AC_PROG_AWK
+
 dnl check for prelinkable linker
 dnl ----------------------------
 LIBFIRM_PROG_LD_R
@@ -392,5 +405,5 @@ dnl ===============
 
 AC_OUTPUT($ac_output_file,[ touch stamp-h ])
 
-dnl snip the lower prt of config.h and put it to ir/config/firm_config.h
-gawk -f $CONF_DIR_NAME/filter.awk < config.h | sed -f $CONF_DIR_NAME/filter.sed > ir/config/firm_config.h
+dnl snip the lower part of config.h and put it to ir/config/firm_config.h
+$AWK -f $CONF_DIR_NAME/filter.awk < config.h | sed -f $CONF_DIR_NAME/filter.sed > ir/config/firm_config.h