test for robodoc in configure if enabled with --enable-autodoc
authorBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Mon, 12 Mar 2001 14:50:48 +0000 (14:50 +0000)
committerBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Mon, 12 Mar 2001 14:50:48 +0000 (14:50 +0000)
rules and target for auto documentation

[r121]

Changes
MakeRules.in
MakeTargets
Makefile.in
configure
configure.in

diff --git a/Changes b/Changes
index a6ea8ab..e80d940 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+  12.3.2001 Boris
+  added auto documentation in Makefiles, configure, etc
+  example in ir/ir/ircons.c - much must be added
+  creation of documentation by 'make autodoc' in architecture directory
+
   5.3.2001 Boris
   added lots of #ifdef HAVE_CONFIG_G #include "config.h" #endif
   replaced some C++ style comments (//) by standard C comments /**/
index 972403a..ccc0e8d 100644 (file)
@@ -31,10 +31,20 @@ ARFLAGS := rc
 
 RANLIB := @RANLIB@
 
+AUTODOC := @ROBODOC@
+AUTODOCDIR := $(topdir)/auto_doc
+INDEXFILE := $(AUTODOCDIR)/index.html
+GLOBALXREFFILE := $(AUTODOCDIR)/libfirm.html.xrefs
+LOCALXREFSFILE := .xrefs
+
 DISTFILES = $(SOURCES)
 CFILES = $(filter %.c,$(SOURCES) $(GENFILES))
 HFILES = $(filter %.h,$(SOURCES) $(GENFILES))
 OFILES = $(CFILES:.c=.o)
+XREFFILES = $(addsuffix .xref, $(filter %.c, $(SOURCES)) $(filter %.h, $(SOURCES)))
+HTMLFILES = $(addprefix $(AUTODOCDIR)/, $(XREFFILES:.xref=.html))
+
+GENFILES += $(LOCALXREFSFILE) $(XREFFILES)
 
 TAGFILES = $(CFILES) $(HFILES)
 
@@ -55,6 +65,23 @@ COMPILE.s = $(CC) -S $(DEFS) $(CPPFLAGS) $(CDEBUG) $(CFLAGS) $(XCFLAGS)
 %.c: %.dot
        $(DT) $(DTFLAGS) <$^ >$@ || $(fail)
 
+%.xref: %
+       $(AUTODOC) $< $(@:.xref=.html) INTERNAL HTML GENXREF $@
+
+$(AUTODOCDIR)/%.html: % $(GLOBALXREFFILE)
+       $(AUTODOC) $< $@ HTML INTERNAL XREF $(GLOBALXREFFILE)
+
+$(AUTODOCDIR):
+       mkdir $@
+
+$(LOCALXREFSFILE): $(XREFFILES)
+ifeq ($(strip $(XREFSFILE)),)
+       $(RM) $@
+       touch $@
+else
+       ls *.xref > $@
+endif
+
 
 define fail
 { $(RM) $@; false; }
@@ -75,4 +102,4 @@ test -z "$$fail"
 endef
 endif
 
-targets = all clean depend echodist echogen echosrc realclean tags install
+targets = all clean depend echodist echogen echosrc realclean tags install autodoc autodoc_xref autodoc_html
index 278aa7a..ec4cf1b 100644 (file)
@@ -31,6 +31,14 @@ else
        $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; }
 endif
 
+autodoc_xref: subdir_autodoc_xref local_autodoc_xref
+.PHONY: local_autodoc_xref
+local_autodoc_xref: $(LOCALXREFSFILE)
+
+autodoc_html: subdir_autodoc_html local_autodoc_html
+.PHONY: local_autodoc_html
+local_autodoc_html: $(HTMLFILES)
+
 
 # Recurse into $(subdirs) for $(targets)
 $(addprefix subdir_,$(targets)): $(subdirs)
index 4d4bd05..9862ed5 100644 (file)
@@ -30,7 +30,7 @@ SOURCES := Makefile.in MakeRules.in MakeTargets\
 
 INSTALL_LIBS = libfirm.a
 
-GENFILES := config.h stamp-h config.log config.cache
+GENFILES := stamp-h config.log config.cache
 
 # config.status config.h.in $(srcdir)/stamp-h.in
 
@@ -52,6 +52,18 @@ testprograms:        libfirm.a
        $(MAKE) -C testprograms
 
 
+# generate program documentation
+autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
+
+$(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
+#      cat $^ > $@
+       $(RM) $@
+       find $(PWD) -name "*.xref" -print > $@
+
+$(INDEXFILE): $(GLOBALXREFFILE)
+       $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
+
+
 #${srcdir}/configure: configure.in aclocal.m4
 $(srcdir)/configure: configure.in
        cd $(srcdir) && autoconf
index 17fe563..f8a2170 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,6 +27,8 @@ ac_help="$ac_help
   --enable-debug          enable assertions and additional debugging routines"
 ac_help="$ac_help
   --enable-profile        enable profiling"
+ac_help="$ac_help
+  --enable-autodoc        enable auto documentation"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -568,7 +570,6 @@ libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${
 
 
 
-
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -588,7 +589,6 @@ fi
 
 
 
-
 # Check whether --enable-profile or --disable-profile was given.
 if test "${enable_profile+set}" = set; then
   enableval="$enable_profile"
@@ -601,13 +601,24 @@ fi
 
 
 
+# Check whether --enable-autodoc or --disable-autodoc was given.
+if test "${enable_autodoc+set}" = set; then
+  enableval="$enable_autodoc"
+  if test "$enableval"=yes; then
+  enable_auto_documentation=yes
+fi
+else
+  enable_auto_documentation=no
+fi
+
+
 
 
 
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:611: checking for $ac_word" >&5
+echo "configure:622: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -637,7 +648,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:641: checking for $ac_word" >&5
+echo "configure:652: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -688,7 +699,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:692: checking for $ac_word" >&5
+echo "configure:703: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -720,7 +731,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -731,12 +742,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 735 "configure"
+#line 746 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -762,12 +773,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:777: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:771: checking whether we are using GNU C" >&5
+echo "configure:782: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -776,7 +787,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -795,7 +806,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:810: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -828,14 +839,13 @@ fi
 
 
 
-
 # Make sure we can run config.sub.
 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:839: checking host system type" >&5
+echo "configure:849: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -856,7 +866,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:860: checking build system type" >&5
+echo "configure:870: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -883,7 +893,7 @@ if test -z "$LD" && test "$GCC" = yes; then
   # Extract the first word of "${ac_tool_prefix}gld", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:887: checking for $ac_word" >&5
+echo "configure:897: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -915,7 +925,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "gld", so it can be a program name with args.
 set dummy gld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:919: checking for $ac_word" >&5
+echo "configure:929: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -952,7 +962,7 @@ if test -z "$LD"; then
   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:956: checking for $ac_word" >&5
+echo "configure:966: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -984,7 +994,7 @@ fi
 fi
 
 echo $ac_n "checking whether $LD accepts -r""... $ac_c" 1>&6
-echo "configure:988: checking whether $LD accepts -r" >&5
+echo "configure:998: checking whether $LD accepts -r" >&5
 if eval "test \"`echo '$''{'libfirm_cv_prog_ld_r'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1015,11 +1025,10 @@ if test "$libfirm_cv_prog_ld_r" != "yes"; then
   { echo "configure: error: need a prelinkcapable linker" 1>&2; exit 1; }
 fi
 
-
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1023: checking for $ac_word" >&5
+echo "configure:1032: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1054,7 +1063,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1058: checking for $ac_word" >&5
+echo "configure:1067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1094,7 +1103,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1098: checking for a BSD compatible install" >&5
+echo "configure:1107: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1147,9 +1156,45 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
+if test "$enable_auto_documentation" = yes; then
+  # Extract the first word of "robodoc", so it can be a program name with args.
+set dummy robodoc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1164: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ROBODOC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$ROBODOC"; then
+  ac_cv_prog_ROBODOC="$ROBODOC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_ROBODOC=""robodoc""
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_ROBODOC" && ac_cv_prog_ROBODOC=""""
+fi
+fi
+ROBODOC="$ac_cv_prog_ROBODOC"
+if test -n "$ROBODOC"; then
+  echo "$ac_t""$ROBODOC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test "$ROBODOC" != "robodoc"; then
+    { echo "configure: error: need robodoc for auto documentation (IPD: module add robodoc)" 1>&2; exit 1; }
+  fi
+fi
+
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1153: checking how to run the C preprocessor" >&5
+echo "configure:1198: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1164,13 +1209,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1168 "configure"
+#line 1213 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1181,13 +1226,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1185 "configure"
+#line 1230 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1198,13 +1243,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1202 "configure"
+#line 1247 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1229,12 +1274,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1233: checking for ANSI C header files" >&5
+echo "configure:1278: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1238 "configure"
+#line 1283 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1242,7 +1287,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1259,7 +1304,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1263 "configure"
+#line 1308 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1277,7 +1322,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1326 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1298,7 +1343,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1302 "configure"
+#line 1347 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1309,7 +1354,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1338,17 +1383,17 @@ for ac_hdr in math.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1342: checking for $ac_hdr" >&5
+echo "configure:1387: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1347 "configure"
+#line 1392 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1385,17 +1430,17 @@ for ac_hdr in gmp.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1389: checking for $ac_hdr" >&5
+echo "configure:1434: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+#line 1439 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1432,17 +1477,17 @@ for ac_hdr in obstack.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1436: checking for $ac_hdr" >&5
+echo "configure:1481: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1441 "configure"
+#line 1486 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1477,7 +1522,7 @@ fi
 
 
 echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
-echo "configure:1481: checking for main in -lgmp" >&5
+echo "configure:1526: checking for main in -lgmp" >&5
 ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1485,14 +1530,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1489 "configure"
+#line 1534 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1519,7 +1564,7 @@ fi
 
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:1523: checking for main in -lm" >&5
+echo "configure:1568: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1527,14 +1572,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1531 "configure"
+#line 1576 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1565,12 +1610,12 @@ fi
 
 
 echo $ac_n "checking for strerror""... $ac_c" 1>&6
-echo "configure:1569: checking for strerror" >&5
+echo "configure:1614: checking for strerror" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1574 "configure"
+#line 1619 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strerror(); below.  */
@@ -1593,7 +1638,7 @@ strerror();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_strerror=yes"
 else
@@ -1754,6 +1799,7 @@ s%@mandir@%$mandir%g
 s%@libfirm_conf_env@%$libfirm_conf_env%g
 s%@enable_debug_libfirm@%$enable_debug_libfirm%g
 s%@enable_profile_libfirm@%$enable_profile_libfirm%g
+s%@enable_auto_documentation@%$enable_auto_documentation%g
 s%@CC@%$CC%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
@@ -1772,6 +1818,7 @@ s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@ROBODOC@%$ROBODOC%g
 s%@CPP@%$CPP%g
 
 CEOF
index c0ec1b2..e065323 100644 (file)
@@ -26,7 +26,7 @@ dnl Package options
 dnl ===============
 
 dnl set debugging
-
+dnl -------------
 AC_ARG_ENABLE(debug,
 [  --enable-debug          enable assertions and additional debugging routines],
 [if test "$enableval" = yes; then
@@ -38,7 +38,7 @@ AC_SUBST(enable_debug_libfirm)
 
 
 dnl set profiling
-
+dnl -------------
 AC_ARG_ENABLE(profile,
 [  --enable-profile        enable profiling],
 [if test "$enableval"=yes; then
@@ -47,23 +47,33 @@ fi],
 [enable_profile_libfirm=no])
 AC_SUBST(enable_profile_libfirm)
 
+dnl set auto documentation
+dnl ----------------------
+AC_ARG_ENABLE(autodoc,
+[  --enable-autodoc        enable auto documentation],
+[if test "$enableval"=yes; then
+  enable_auto_documentation=yes
+fi],
+[enable_auto_documentation=no])
+AC_SUBST(enable_auto_documentation)
+
 
 dnl Checks for programs.
 dnl ====================
 
-dnl check for a compiler
-
+dnl check for a compiler
+dnl ----------------------
 AC_PROG_CC
 
 dnl check for prelinkable linker
-
+dnl ----------------------------
 LIBFIRM_PROG_LD_R
 if test "$libfirm_cv_prog_ld_r" != "yes"; then
   AC_MSG_ERROR(need a prelinkcapable linker)
 fi
 
 dnl check for ar
-
+dnl ------------
 AC_CHECK_PROG(AR, ar, "ar", "")
 if test "$AR" != "ar"; then
   AC_MSG_ERROR(need ar for creating archives)
@@ -77,6 +87,15 @@ AC_PROG_RANLIB
 
 AC_PROG_INSTALL
 
+dnl check for robodoc if enabled
+dnl ----------------------------
+if test "$enable_auto_documentation" = yes; then
+  AC_CHECK_PROG(ROBODOC, robodoc, "robodoc", "")
+  if test "$ROBODOC" != "robodoc"; then
+    AC_MSG_ERROR(need robodoc for auto documentation (IPD: module add robodoc))
+  fi
+fi
+
 dnl Checks for header files.
 dnl ========================