* Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 7 Apr 2003 20:20:45 +0000 (20:20 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 7 Apr 2003 20:20:45 +0000 (20:20 +0000)
* configure.in: big cleanup, updated to autoconf 2.5x
* configure: rebuilt from configure.in
* sdccconf_in.h: new RETSIGTYPE, and other PATHs
* sdcc_vc_in.h: reflect changes from sdccconf.h
* doc/Makefile: fixed 2 flaws in "make install"

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2491 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
Makefile.common.in
configure
configure.in
doc/sdccman.lyx
sdcc_vc_in.h
sdccconf_in.h
src/SDCCglobl.h
src/SDCCutil.h
support/cpp2/Makefile.in

index f985e59988a071d6a57f75ae55117942bbdebe62..54fb6f4f469e5b0de4592bd3fd7a4477067653c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-04-07  Bernhard Held <bernhard@bernhardheld.de>
+
+       * configure.in: fully support prefix, exec_prefix, datadir, docdir;
+       fix bug #487815
+       * support/cpp2/Makefile.in: fix bug #487815
+       * configure: rebuilt from configure.in
+       * Makefile.common.in: docdir changed, new path suffixes
+       * sdccconf_in.h: new RETSIGTYPE, and other PATHs
+       * sdcc_vc_in.h: reflect changes from sdccconf.h
+       * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
+       * src/SDCCutil.h: remove BINDIR hack
+       * doc/sdccman.lyx: update new path hierarchy
+
 2003-04-06    Paul Stoffregen <paul@pjrc.com>
 
        * src/SDCCpeeph.c: added okToRemoveSLOC test
@@ -52,6 +65,7 @@
        * sdcc_vc_in.h: reflect changes from sdccconf.h
        * doc/Makefile: fixed a flaw in "make install"
 
+>>>>>>> 1.252
 2003-04-02    <johan@balder>
 
        * src/ds390/gen.c (genCmp): no comments
index eb8abd765338eee9836471ead0d0dc626857d230..90d0edcbae3ed1190bfe8ec5fa5ab990691fd7b3 100644 (file)
@@ -14,7 +14,7 @@ CC            = @CC@
 CPP            = @CPP@
 RANLIB         = @RANLIB@
 INSTALL                = @INSTALL@
-YACC            = @YACC@ 
+YACC            = @YACC@
 LEX             = @LEX@ 
 AWK             = @AWK@
 STRIP           = @STRIP@
@@ -29,7 +29,10 @@ man1dir         = $(mandir)/man1
 man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
-docdir          = @datadir@/doc
+docdir          = @docdir@
+
+include_dir_suffix = @include_dir_suffix@
+lib_dir_suffix     = @lib_dir_suffix@
 
 # Modules to enable/disable
 OPT_ENABLE_UCSIM = @OPT_ENABLE_UCSIM@
@@ -44,7 +47,7 @@ transform       = @program_transform_name@
 
 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
 CPPFLAGS        = $(INCLUDEFLAGS) -I. -I$(PRJDIR) -I$(SLIB)
-CFLAGS          = @CFLAGS@ -Wall
+CFLAGS          = -Wall @CFLAGS@
 M_OR_MM         = @M_OR_MM@
 
 EXTRALIBS      = @LIBS@
index a828681467e461fcca0fa9fd3949615b1808a6f2..759b1fa3a56bc00f470c19318cc5656868d1fee7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.54.
+# Generated by GNU Autoconf 2.57.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
@@ -36,7 +36,10 @@ PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
 do
   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
@@ -82,15 +85,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conftest.sh
-  echo  "exit 0"   >>conftest.sh
-  chmod +x conftest.sh
-  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
-  rm -f conftest.sh
+  rm -f conf$$.sh
 fi
 
 
@@ -308,7 +311,7 @@ ac_includes_default="\
 ac_subdirs_all="$ac_subdirs_all support/cpp2"
 ac_subdirs_all="$ac_subdirs_all packihx"
 ac_subdirs_all="$ac_subdirs_all sim/ucsim"
-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 AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP LYX LATEX LATEX2HTML PDFLATEX DVIPDF EGREP M_OR_MM sdcc_datadir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs 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 AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP LYX LATEX LATEX2HTML PDFLATEX DVIPDF EGREP M_OR_MM include_dir_suffix lib_dir_suffix docdir sdcc_include_dir sdcc_datadir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -956,7 +959,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.54.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
@@ -1008,24 +1011,54 @@ _ACEOF
 
 # Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
 # Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
 ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
 ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
 do
-  case $ac_arg in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n ) continue ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    continue ;;
-  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-  # Get rid of the leading space.
-  ac_sep=" "
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
 done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1665,8 +1698,10 @@ fi
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
@@ -1691,7 +1726,11 @@ ac_compiler=`set X $ac_compile; echo $2`
 
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1702,7 +1741,7 @@ main ()
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
@@ -1721,27 +1760,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
 # Be careful to initialize this variable, since it used to be cached.
 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
 ac_cv_exeext=
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
-    a.out ) # We found the default executable, but exeext='' is most
-            # certainly right.
-            break;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
-          export ac_cv_exeext
-          break;;
-    * ) break;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+        ;;
+    conftest.$ac_ext )
+        # This is the source file.
+        ;;
+    [ab].out )
+        # We found the default executable, but exeext='' is most
+        # certainly right.
+        break;;
+    *.* )
+        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+        # FIXME: I believe we export ac_cv_exeext for Libtool,
+        # but it would be cool to find out if it's true.  Does anybody
+        # maintain Libtool? --akim.
+        export ac_cv_exeext
+        break;;
+    * )
+        break;;
   esac
 done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
-check \`config.log' for details." >&5
+See \`config.log' for more details." >&5
 echo "$as_me: error: C compiler cannot create executables
-check \`config.log' for details." >&2;}
+See \`config.log' for more details." >&2;}
    { (exit 77); exit 77; }; }
 fi
 
@@ -1768,9 +1819,11 @@ if test "$cross_compiling" != yes; then
        cross_compiling=yes
     else
        { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
     fi
   fi
@@ -1778,7 +1831,7 @@ fi
 echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
@@ -1809,8 +1862,10 @@ for ac_file in conftest.exe conftest conftest.*; do
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -1828,7 +1883,11 @@ if test "${ac_cv_objext+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1853,9 +1912,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -1872,7 +1934,11 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1900,7 +1966,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_compiler_gnu=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -1920,7 +1987,11 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1945,7 +2016,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_prog_cc_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -1976,7 +2048,11 @@ else
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -2039,7 +2115,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext
 done
@@ -2090,7 +2167,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 do
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 $ac_declaration
 int
@@ -2116,13 +2197,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   :
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_declaration
 int
 main ()
@@ -2147,7 +2233,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
@@ -2160,7 +2247,8 @@ fi
 
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
@@ -2289,7 +2377,11 @@ if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -2317,7 +2409,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_compiler_gnu=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2337,7 +2430,11 @@ if test "${ac_cv_prog_cxx_g+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -2362,7 +2459,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_prog_cxx_g=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_prog_cxx_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2395,7 +2493,11 @@ for ac_declaration in \
 do
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 $ac_declaration
 int
@@ -2421,13 +2523,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   :
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_declaration
 int
 main ()
@@ -2452,7 +2559,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
@@ -2492,12 +2600,22 @@ for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2520,7 +2638,8 @@ if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Broken: fails on valid input.
 continue
 fi
@@ -2530,7 +2649,11 @@ rm -f conftest.err conftest.$ac_ext
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2554,7 +2677,8 @@ if test -z "$ac_cpp_err"; then
 continue
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -2583,12 +2707,22 @@ for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2611,7 +2745,8 @@ if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Broken: fails on valid input.
 continue
 fi
@@ -2621,7 +2756,11 @@ rm -f conftest.err conftest.$ac_ext
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2645,7 +2784,8 @@ if test -z "$ac_cpp_err"; then
 continue
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -2658,8 +2798,10 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -2904,7 +3046,11 @@ else
 LIBS="-lfl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2936,7 +3082,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_cv_lib_fl_yywrap=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_fl_yywrap=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -2956,7 +3103,11 @@ else
 LIBS="-ll  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2988,7 +3139,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_cv_lib_l_yywrap=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_l_yywrap=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3066,7 +3218,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_cv_prog_lex_yytext_pointer=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_save_LIBS
@@ -3499,43 +3652,54 @@ if test "${ac_cv_header_stdc+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <float.h>
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  grep -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
+  (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_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_stdc=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <string.h>
 
 _ACEOF
@@ -3553,7 +3717,11 @@ 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 <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 
 _ACEOF
@@ -3574,13 +3742,18 @@ if test $ac_cv_header_stdc = yes; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 #else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
                      || ('j' <= (c) && (c) <= 'r') \
                      || ('s' <= (c) && (c) <= 'z'))
 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
@@ -3613,7 +3786,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
 ac_cv_header_stdc=no
 fi
@@ -3652,7 +3826,11 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 
 #include <$ac_header>
@@ -3672,7 +3850,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 eval "$as_ac_Header=no"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -3707,7 +3886,11 @@ 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
@@ -3726,7 +3909,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -3738,7 +3922,11 @@ 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -3761,7 +3949,8 @@ if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   ac_header_preproc=no
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -3774,14 +3963,32 @@ case $ac_header_compiler:$ac_header_preproc in
     { 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;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&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;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
 echo "$as_me:$LINENO: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -3818,31 +4025,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* 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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
 #endif
 
+int
+main ()
+{
+return f != $ac_func;
   ;
   return 0;
 }
@@ -3862,7 +4082,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3891,31 +4112,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* 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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
 #endif
 
+int
+main ()
+{
+return f != $ac_func;
   ;
   return 0;
 }
@@ -3935,7 +4169,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3961,16 +4196,65 @@ done
 
 
 
-# This macro _AC_DEFINEs VARNAME to the expansion of the DIR variable,
-# taking care of fixing up ${prefix} and such.
+# This macro expands DIR and assigns it to RET.
+# If DIR is NONE, then it's replaced by DEFAULT.
 #
-# Note that the 3 argument form is only supported with autoconf 2.13
-# and later (i.e. only where _AC_DEFINE supports 3 arguments).
+# Based on AC_DEFINE_DIR
 #
 # Examples:
 #
-#  AC_DEFINE_DIR(DATADIR, datadir)
-#  AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+#  AC_EXPAND(prefix, "/usr/local", expanded_prefix)
+
+
+
+# adl_NORMALIZE_PATH
+#
+#  - empty paths are changed to '.'
+#  - trailing slashes are removed
+#  - repeated slashes are squeezed except a leading doubled slash '//'
+#    (which might indicate a networked disk on some OS).
+#
+#
+# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
+# REFERENCE_STRING contains some backslashes, all slashes and backslashes
+# are turned into backslashes, otherwise they are all turned into slashes.
+#
+# This makes processing of DOS filenames quite easier, because you can turn a
+# filename to the Unix notation, make your processing, and turn it back to
+# original notation.
+
+
+
+
+# adl_COMPUTE_RELATIVE_PATH
+#
+# PATH_LIST is a space-separated list of colon-separated triplets of the form
+# 'FROM:TO:RESULT'. This function iterates over these triplets and set $RESULT
+# to the relative path from $FROM to $TO. Note that $FROM and $TO needs to be
+# absolute filenames for this macro to success.
+
+
+
+## Note:
+## *****
+## The following helper macros are too fragile to be used out
+## of adl_COMPUTE_RELATIVE_PATHS (mainly because they assume that
+## paths are normalized), that's why I'm keeping them in the same file.
+## Still, some of them maybe worth to reuse.
+
+
+
+
+
+
+
+
+
+
+
+
+
+# AC_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
 
 
 
@@ -4020,7 +4304,7 @@ echo "$as_me:$LINENO: result: $sdcc_cv_CCggdb" >&5
 echo "${ECHO_T}$sdcc_cv_CCggdb" >&6
 
 if test "$sdcc_cv_CCggdb" = "yes"; then
-  CFLAGS="-ggdb -O2"
+  CFLAGS="-ggdb ${CFLAGS}"
 fi
 
 
@@ -4045,9 +4329,10 @@ echo "$as_me:$LINENO: result: $sdcc_cv_CCpipe" >&5
 echo "${ECHO_T}$sdcc_cv_CCpipe" >&6
 
 if test "$sdcc_cv_CCpipe" = "yes"; then
-  CFLAGS="$CFLAGS -pipe"
+  CFLAGS="-pipe $CFLAGS"
 fi
 
+
 # Checks for typedefs, structures, and compiler characteristics.
 # ===========================================================================
 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
@@ -4057,7 +4342,11 @@ if test "${ac_cv_type_signal+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <sys/types.h>
 #include <signal.h>
 #ifdef signal
@@ -4092,7 +4381,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_type_signal=void
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_type_signal=int
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4113,7 +4403,11 @@ if test "${ac_cv_type_char+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4141,7 +4435,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_type_char=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_type_char=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4163,7 +4458,11 @@ else
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4191,7 +4490,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4218,7 +4521,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr $ac_mid + 1`
                     if test $ac_lo -le $ac_mid; then
                       ac_lo= ac_hi=
@@ -4230,10 +4534,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4261,7 +4570,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4288,7 +4601,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_lo=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_hi=`expr '(' $ac_mid ')' - 1`
                        if test $ac_mid -le $ac_hi; then
                          ac_lo= ac_hi=
@@ -4300,7 +4614,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo= ac_hi=
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4311,7 +4626,11 @@ while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4338,26 +4657,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 case $ac_lo in
 ?*) ac_cv_sizeof_char=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
-echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 long longval () { return (long) (sizeof (char)); }
 unsigned long ulongval () { return (long) (sizeof (char)); }
@@ -4405,10 +4733,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
-echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -4433,7 +4764,11 @@ if test "${ac_cv_type_short+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4461,7 +4796,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_type_short=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_type_short=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4483,7 +4819,11 @@ else
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4511,7 +4851,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4538,7 +4882,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr $ac_mid + 1`
                     if test $ac_lo -le $ac_mid; then
                       ac_lo= ac_hi=
@@ -4550,10 +4895,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4581,7 +4931,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4608,7 +4962,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_lo=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_hi=`expr '(' $ac_mid ')' - 1`
                        if test $ac_mid -le $ac_hi; then
                          ac_lo= ac_hi=
@@ -4620,7 +4975,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo= ac_hi=
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4631,7 +4987,11 @@ while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4658,26 +5018,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 case $ac_lo in
 ?*) ac_cv_sizeof_short=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
-echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 long longval () { return (long) (sizeof (short)); }
 unsigned long ulongval () { return (long) (sizeof (short)); }
@@ -4725,10 +5094,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
-echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -4753,7 +5125,11 @@ if test "${ac_cv_type_int+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4781,7 +5157,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_type_int=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_type_int=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4803,7 +5180,11 @@ else
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4831,7 +5212,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4858,7 +5243,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr $ac_mid + 1`
                     if test $ac_lo -le $ac_mid; then
                       ac_lo= ac_hi=
@@ -4870,10 +5256,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4901,7 +5292,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4928,7 +5323,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_lo=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_hi=`expr '(' $ac_mid ')' - 1`
                        if test $ac_mid -le $ac_hi; then
                          ac_lo= ac_hi=
@@ -4940,7 +5336,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo= ac_hi=
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4951,7 +5348,11 @@ while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -4978,26 +5379,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 case $ac_lo in
 ?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 long longval () { return (long) (sizeof (int)); }
 unsigned long ulongval () { return (long) (sizeof (int)); }
@@ -5045,10 +5455,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -5073,7 +5486,11 @@ if test "${ac_cv_type_long+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5101,7 +5518,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_type_long=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_type_long=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5123,7 +5541,11 @@ else
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5151,7 +5573,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5178,7 +5604,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr $ac_mid + 1`
                     if test $ac_lo -le $ac_mid; then
                       ac_lo= ac_hi=
@@ -5190,10 +5617,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5221,7 +5653,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5248,7 +5684,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_lo=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_hi=`expr '(' $ac_mid ')' - 1`
                        if test $ac_mid -le $ac_hi; then
                          ac_lo= ac_hi=
@@ -5260,7 +5697,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo= ac_hi=
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5271,7 +5709,11 @@ while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
@@ -5298,26 +5740,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_hi=$ac_mid
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 case $ac_lo in
 ?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_includes_default
 long longval () { return (long) (sizeof (long)); }
 unsigned long ulongval () { return (long) (sizeof (long)); }
@@ -5365,10 +5816,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -5444,7 +5898,11 @@ else
   # See if sys/param.h defines the BYTE_ORDER macro.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/param.h>
 
@@ -5474,7 +5932,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/param.h>
 
@@ -5504,20 +5966,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_cv_c_bigendian=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_c_bigendian=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 # It does not; compile a test program.
 if test "$cross_compiling" = yes; then
   # try to guess the endianness by grepping values into an object file
   ac_cv_c_bigendian=unknown
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
@@ -5557,13 +6025,18 @@ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
 fi
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 int
 main ()
 {
@@ -5592,7 +6065,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ( exit $ac_status )
 ac_cv_c_bigendian=yes
 fi
@@ -5623,203 +6097,811 @@ esac
 
 # Set standard installation paths
 # ===========================================================================
-case $host in
-    *mingw32*)
-       MINGW32_HOST="yes"
-       ;;
-    *)
-       MINGW32_HOST="no"
-       ;;
-esac
+
+# In the Makefiles we need paths with '/' as directory separator, even if
+# crosscompiling for Win32.
+# And we want to preserve the macros (e.g. ${prefix}) in the Makefiles.
+# The variables in the Makefiles are replaced by AC_SUBST()
+#
+# In sdccconf.h the '/' in paths are replaced by "\\" (normalized).
+# The macros are expanded for the header.
+# The variables in the header are replaced by AC_*DEFINE*()
+
+echo "$as_me:$LINENO: checking -mno-cygwin" >&5
+echo $ECHO_N "checking -mno-cygwin... $ECHO_C" >&6
+  case ${CFLAGS} in
+      *-mno-cygwin*)
+         MINGW32_HOST="yes"
+         ;;
+      *)
+         MINGW32_HOST="no"
+         ;;
+  esac
+echo "$as_me:$LINENO: result: $MINGW32_HOST" >&5
+echo "${ECHO_T}$MINGW32_HOST" >&6
 
 echo "$as_me:$LINENO: checking host mingw32" >&5
 echo $ECHO_N "checking host mingw32... $ECHO_C" >&6
+  case ${host} in
+      *mingw32*)
+         MINGW32_HOST="yes"
+         ;;
+  esac
 echo "$as_me:$LINENO: result: $MINGW32_HOST" >&5
 echo "${ECHO_T}$MINGW32_HOST" >&6
 
-# prefix: *nix default is "NONE"
-# prefix: mingw32 default is "/sdcc"
-if test "$prefix" = NONE; then
-    if test "$MINGW32_HOST" = "no"; then
-       prefix="/usr/local"
-    else
-       prefix="/sdcc"
-    fi
+if test "${MINGW32_HOST}" = "no"; then
+    dir_separator="/"
+else
+    dir_separator="\\\\"
 fi
 
-# datadir: *nix default is "${prefix}/share"
-if test "$datadir" = "\${prefix}/share"; then
-    if test "$MINGW32_HOST" = "no"; then
-       datadir="\${prefix}/share/sdcc"
-    fi
-# mingw32 default is "/sdcc"
-elif test "$datadir" = "/sdcc"; then
-    if test "$MINGW32_HOST" = "yes"; then
-       datadir="\${prefix}"
-    fi
-fi
 
-# standard libs
-cat >>confdefs.h <<_ACEOF
-#define STD_LIB "libsdcc"
-_ACEOF
+# Makefiles
+###########
 
-cat >>confdefs.h <<_ACEOF
-#define STD_INT_LIB "libint"
-_ACEOF
+# include_dir_suffix:
+# *nix    default: "sdcc/include"
+# mingw32 default: "include"
+  if test "${MINGW32_HOST}" = "no"; then
+       include_dir_suffix="sdcc/include"
+  else
+       include_dir_suffix="include"
+  fi
 
-cat >>confdefs.h <<_ACEOF
-#define STD_LONG_LIB "liblong"
-_ACEOF
 
-cat >>confdefs.h <<_ACEOF
-#define STD_FP_LIB "libfloat"
-_ACEOF
+# lib_dir_suffix:
+# *nix    default: "sdcc/lib"
+# mingw32 default: "lib"
+  if test "${MINGW32_HOST}" = "no"; then
+       lib_dir_suffix="sdcc/lib"
+  else
+       lib_dir_suffix="lib"
+  fi
+
+
+# docdir:
+# *nix    default: "${datadir}/sdcc/doc"
+# mingw32 default: "${datadir}/doc"
+  if test "${MINGW32_HOST}" = "no"; then
+       doc_suffix="/sdcc/doc"
+  else
+       doc_suffix="/doc"
+  fi
+  docdir="\${datadir}"${doc_suffix}
+
+
+# sdccconf.h
+############
 
 cat >>confdefs.h <<_ACEOF
-#define STD_DS390_LIB "libds390"
+#define DIR_SEPARATOR_STRING "${dir_separator}"
 _ACEOF
 
 cat >>confdefs.h <<_ACEOF
-#define STD_xa51_LIB "xa51"
+#define DIR_SEPARATOR_CHAR   '${dir_separator}'
 _ACEOF
 
 
+# prefix:
+# *nix    default: "NONE", ${ac_default_prefix}: "/usr/local"
+# mingw32 default: "/sdcc"
 
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${prefix}"`
-  ac_define_dir=`eval echo $ac_define_dir`
+  ac_expand=$prefix
+  test "x$ac_expand" = xNONE && ac_expand="$ac_default_prefix"
+  ac_expand=`eval echo $ac_expand`
+  expanded_prefix=`eval echo $ac_expand`
+
+
+  ac_ndu=$expanded_prefix
+  case ":$ac_ndu:" in
+# change empty paths to '.'
+  ::) ac_ndu='.' ;;
+# strip trailing slashes
+  :*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
   cat >>confdefs.h <<_ACEOF
-#define PREFIX "$ac_define_dir"
+#define PREFIX "${ac_ndu}"
 _ACEOF
 
 
 
+# exec_prefix:
+# default: "${prefix}"
+
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"$datadir"`
-  ac_define_dir=`eval echo $ac_define_dir`
+  ac_expand=$exec_prefix
+  test "x$ac_expand" = xNONE && ac_expand="$expanded_prefix"
+  ac_expand=`eval echo $ac_expand`
+  expanded_exec_prefix=`eval echo $ac_expand`
+
+
+  ac_ndu=$expanded_exec_prefix
+  case ":$ac_ndu:" in
+# change empty paths to '.'
+  ::) ac_ndu='.' ;;
+# strip trailing slashes
+  :*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
   cat >>confdefs.h <<_ACEOF
-#define DATADIR "$ac_define_dir"
+#define EXEC_PREFIX "${ac_ndu}"
 _ACEOF
 
 
 
-
-# search paths
-bin_dir_suffix="bin"
+# bindir:
+# default: "${exec_prefix}/bin"
 
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${bin_dir_suffix}"`
-  ac_define_dir=`eval echo $ac_define_dir`
+  ac_expand=$bindir
+  test "x$ac_expand" = xNONE && ac_expand="$"NONE""
+  ac_expand=`eval echo $ac_expand`
+  expanded_bindir=`eval echo $ac_expand`
+
+
+  ac_ndu=$expanded_bindir
+  case ":$ac_ndu:" in
+# change empty paths to '.'
+  ::) ac_ndu='.' ;;
+# strip trailing slashes
+  :*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
   cat >>confdefs.h <<_ACEOF
-#define BIN_DIR_SUFFIX "$ac_define_dir"
+#define BINDIR "${ac_ndu}"
 _ACEOF
 
 
 
-    if test "$MINGW32_HOST" = "no"; then
-       search_suffix="share/sdcc"
-    else
-       search_suffix=""
-    fi
+# datadir:
+# *nix    default: "${prefix}/share"
+# mingw32 default: "/sdcc"
 
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${search_suffix}"`
-  ac_define_dir=`eval echo $ac_define_dir`
+  ac_expand=$datadir
+  test "x$ac_expand" = xNONE && ac_expand="$"NONE""
+  ac_expand=`eval echo $ac_expand`
+  expanded_datadir=`eval echo $ac_expand`
+
+
+  ac_ndu=$expanded_datadir
+  case ":$ac_ndu:" in
+# change empty paths to '.'
+  ::) ac_ndu='.' ;;
+# strip trailing slashes
+  :*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
   cat >>confdefs.h <<_ACEOF
-#define SEARCH_SUFFIX "$ac_define_dir"
+#define DATADIR "${ac_ndu}"
 _ACEOF
 
 
 
-include_dir_suffix="include"
+# include/lib suffix
+norm_inc_dir_suffix=${include_dir_suffix}
+case ":$norm_inc_dir_suffix:" in
+# change empty paths to '.'
+  ::) norm_inc_dir_suffix='.' ;;
+# strip trailing slashes
+  :*[\\/]:) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) norm_inc_dir_suffix=`echo "[$]norm_inc_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+cat >>confdefs.h <<_ACEOF
+#define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}"
+_ACEOF
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${include_dir_suffix}"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define INCLUDE_DIR_SUFFIX "$ac_define_dir"
+norm_lib_dir_suffix=${lib_dir_suffix}
+case ":$norm_lib_dir_suffix:" in
+# change empty paths to '.'
+  ::) norm_lib_dir_suffix='.' ;;
+# strip trailing slashes
+  :*[\\/]:) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) norm_lib_dir_suffix=`echo "[$]norm_lib_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+cat >>confdefs.h <<_ACEOF
+#define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}"
+_ACEOF
+
+
+# relative paths
+for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do
+  _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
+  _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
+  _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'`
+  _lcl_receval="$_lcl_from"
+_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_receval="$_lcl_to"
+_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_notation="$_lcl_from$_lcl_to"
+  case ":$_lcl_from:" in
+# change empty paths to '.'
+  ::) _lcl_from='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  case ":$_lcl_to:" in
+# change empty paths to '.'
+  ::) _lcl_to='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  _lcl_common_prefix=''
+_lcl_second_prefix_match=''
+while test "$_lcl_second_prefix_match" != 0; do
+  _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"`
+  _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"`
+  if test "$_lcl_second_prefix_match" != 0; then
+    if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then
+      _lcl_common_prefix="$_lcl_first_prefix"
+    else
+      _lcl_second_prefix_match=0
+    fi
+  fi
+done
+_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_first_rel=''
+_lcl_tmp='xxx'
+while test "$_lcl_tmp" != ''; do
+  _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"`
+  if test "$_lcl_first_suffix" != ''; then
+     _lcl_first_suffix="$_lcl_tmp"
+     _lcl_first_rel="../$_lcl_first_rel"
+  fi
+done
+_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
+  case ":$_lcl_result_tmp:" in
+# change empty paths to '.'
+  ::) _lcl_result_tmp='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case "$_lcl_notation" in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  eval $_lcl_result_var='$_lcl_result_tmp'
+done
+case ":$bin2data_dir:" in
+# change empty paths to '.'
+  ::) bin2data_dir='.' ;;
+# strip trailing slashes
+  :*[\\/]:) bin2data_dir=`echo "$bin2data_dir" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) bin2data_dir=`echo "[$]bin2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) bin2data_dir=`echo "$bin2data_dir" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+cat >>confdefs.h <<_ACEOF
+#define BIN2DATA_DIR DIR_SEPARATOR_STRING "${bin2data_dir}"
+_ACEOF
+
+
+for _lcl_i in expanded_prefix:expanded_bindir:prefix2bin_dir; do
+  _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
+  _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
+  _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'`
+  _lcl_receval="$_lcl_from"
+_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_receval="$_lcl_to"
+_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_notation="$_lcl_from$_lcl_to"
+  case ":$_lcl_from:" in
+# change empty paths to '.'
+  ::) _lcl_from='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  case ":$_lcl_to:" in
+# change empty paths to '.'
+  ::) _lcl_to='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  _lcl_common_prefix=''
+_lcl_second_prefix_match=''
+while test "$_lcl_second_prefix_match" != 0; do
+  _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"`
+  _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"`
+  if test "$_lcl_second_prefix_match" != 0; then
+    if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then
+      _lcl_common_prefix="$_lcl_first_prefix"
+    else
+      _lcl_second_prefix_match=0
+    fi
+  fi
+done
+_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_first_rel=''
+_lcl_tmp='xxx'
+while test "$_lcl_tmp" != ''; do
+  _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"`
+  if test "$_lcl_first_suffix" != ''; then
+     _lcl_first_suffix="$_lcl_tmp"
+     _lcl_first_rel="../$_lcl_first_rel"
+  fi
+done
+_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
+  case ":$_lcl_result_tmp:" in
+# change empty paths to '.'
+  ::) _lcl_result_tmp='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case "$_lcl_notation" in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  eval $_lcl_result_var='$_lcl_result_tmp'
+done
+case ":$prefix2bin_dir:" in
+# change empty paths to '.'
+  ::) prefix2bin_dir='.' ;;
+# strip trailing slashes
+  :*[\\/]:) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) prefix2bin_dir=`echo "[$]prefix2bin_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+cat >>confdefs.h <<_ACEOF
+#define PREFIX2BIN_DIR DIR_SEPARATOR_STRING "${prefix2bin_dir}"
+_ACEOF
+
+
+for _lcl_i in expanded_prefix:expanded_datadir:prefix2data_dir; do
+  _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
+  _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
+  _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'`
+  _lcl_receval="$_lcl_from"
+_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_receval="$_lcl_to"
+_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "$_lcl_receval_old" != "$_lcl_receval"; do
+       _lcl_receval_old="$_lcl_receval"
+       eval _lcl_receval="\"$_lcl_receval\""
+     done
+     echo "$_lcl_receval")`
+  _lcl_notation="$_lcl_from$_lcl_to"
+  case ":$_lcl_from:" in
+# change empty paths to '.'
+  ::) _lcl_from='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  case ":$_lcl_to:" in
+# change empty paths to '.'
+  ::) _lcl_to='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case '/' in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  _lcl_common_prefix=''
+_lcl_second_prefix_match=''
+while test "$_lcl_second_prefix_match" != 0; do
+  _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"`
+  _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"`
+  if test "$_lcl_second_prefix_match" != 0; then
+    if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then
+      _lcl_common_prefix="$_lcl_first_prefix"
+    else
+      _lcl_second_prefix_match=0
+    fi
+  fi
+done
+_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_first_rel=''
+_lcl_tmp='xxx'
+while test "$_lcl_tmp" != ''; do
+  _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"`
+  if test "$_lcl_first_suffix" != ''; then
+     _lcl_first_suffix="$_lcl_tmp"
+     _lcl_first_rel="../$_lcl_first_rel"
+  fi
+done
+_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
+_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
+  case ":$_lcl_result_tmp:" in
+# change empty paths to '.'
+  ::) _lcl_result_tmp='.' ;;
+# strip trailing slashes
+  :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case "$_lcl_notation" in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+  eval $_lcl_result_var='$_lcl_result_tmp'
+done
+case ":$prefix2data_dir:" in
+# change empty paths to '.'
+  ::) prefix2data_dir='.' ;;
+# strip trailing slashes
+  :*[\\/]:) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,[\\/]*$,,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case $dir_separator in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) prefix2data_dir=`echo "[$]prefix2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,[\\/][\\/]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+if test "${prefix2data_dir}" = "."; then
+    # small optimization for Mingw32; otherwise Borut will complain ;-)
+    cat >>confdefs.h <<_ACEOF
+#define PREFIX2DATA_DIR ""
 _ACEOF
 
+else
+    cat >>confdefs.h <<_ACEOF
+#define PREFIX2DATA_DIR DIR_SEPARATOR_STRING "${prefix2data_dir}"
+_ACEOF
 
+fi
 
-lib_dir_suffix="lib"
+# standard libs
 cat >>confdefs.h <<_ACEOF
-#define LIB_DIR_SUFFIX "${lib_dir_suffix}"
+#define STD_LIB "libsdcc"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define STD_INT_LIB "libint"
+_ACEOF
 
-### <Obsolete>
-# sdcc_datadir is still used in [device,lib]/Makefile
-sdcc_datadir=${datadir}
+cat >>confdefs.h <<_ACEOF
+#define STD_LONG_LIB "liblong"
+_ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define STD_FP_LIB "libfloat"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define STD_DS390_LIB "libds390"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define STD_xa51_LIB "xa51"
+_ACEOF
+
+
+### <Obsolete>
+sdcc_include_dir="\${datadir}/${include_dir_suffix}"
 
-# SDCC_[INCLUDE,LIB]_DIR is still used in SDCCmain.c
-if test "${includedir}" = "\${prefix}/include"; then
-    includedir="${datadir}/include"
-fi
 
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${includedir}"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define SDCC_INCLUDE_DIR "$ac_define_dir"
+  ac_expand=$sdcc_include_dir
+  test "x$ac_expand" = xNONE && ac_expand="$"NONE""
+  ac_expand=`eval echo $ac_expand`
+  expanded_sdcc_include_dir=`eval echo $ac_expand`
+
+cat >>confdefs.h <<_ACEOF
+#define SDCC_INCLUDE_DIR "${expanded_sdcc_include_dir}"
 _ACEOF
 
 
+sdcc_lib_dir="\${datadir}/\${lib_dir_suffix}"
+# AC_SUBST(sdcc_lib_dir)
 
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${datadir}/lib"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define SDCC_LIB_DIR "$ac_define_dir"
+  ac_expand=$sdcc_lib_dir
+  test "x$ac_expand" = xNONE && ac_expand="$"NONE""
+  ac_expand=`eval echo $ac_expand`
+  expanded_sdcc_lib_dir=`eval echo $ac_expand`
+
+cat >>confdefs.h <<_ACEOF
+#define SDCC_LIB_DIR "${expanded_sdcc_lib_dir}"
 _ACEOF
 
 
+sdcc_datadir=${datadir}/sdcc
+
+
 ### </Obsolete>
 
 # environment variables
 sdcc_dir_name="SDCC_HOME"
-
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${sdcc_dir_name}"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define SDCC_DIR_NAME "$ac_define_dir"
+cat >>confdefs.h <<_ACEOF
+#define SDCC_DIR_NAME "${sdcc_dir_name}"
 _ACEOF
 
 
 sdcc_include_name="SDCC_INCLUDE"
-
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${sdcc_include_name}"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define SDCC_INCLUDE_NAME "$ac_define_dir"
+cat >>confdefs.h <<_ACEOF
+#define SDCC_INCLUDE_NAME "${sdcc_include_name}"
 _ACEOF
 
 
 sdcc_lib_name="SDCC_LIB"
-
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $"${sdcc_lib_name}"`
-  ac_define_dir=`eval echo $ac_define_dir`
-  cat >>confdefs.h <<_ACEOF
-#define SDCC_LIB_NAME "$ac_define_dir"
+cat >>confdefs.h <<_ACEOF
+#define SDCC_LIB_NAME "${sdcc_lib_name}"
 _ACEOF
 
 
-
 # Now handle the port selection
 # ===========================================================================
 rm -f ports.all ports.build
@@ -6004,7 +7086,11 @@ else
 LIBS="-lgc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -6036,7 +7122,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_cv_lib_gc_GC_malloc=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_gc_GC_malloc=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -6129,7 +7216,7 @@ _ACEOF
      t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
      : end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
@@ -6189,6 +7276,8 @@ cat >$CONFIG_STATUS <<_ACEOF
 # configure, is in config.log if it exists.
 
 debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
 SHELL=\${CONFIG_SHELL-$SHELL}
 _ACEOF
 
@@ -6223,7 +7312,10 @@ PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
 do
   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
@@ -6269,15 +7361,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conftest.sh
-  echo  "exit 0"   >>conftest.sh
-  chmod +x conftest.sh
-  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
-  rm -f conftest.sh
+  rm -f conf$$.sh
 fi
 
 
@@ -6440,7 +7532,7 @@ _ASBOX
 cat >&5 <<_CSEOF
 
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.54.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6480,6 +7572,7 @@ Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
@@ -6499,7 +7592,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.54,
+configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -6536,12 +7629,9 @@ do
   case $ac_option in
   # Handling of the options.
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
-    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
@@ -6563,6 +7653,9 @@ Try \`$0 --help' for more information." >&2;}
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
   # This is an error.
   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -6577,6 +7670,20 @@ Try \`$0 --help' for more information." >&2;}
   shift
 done
 
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
 _ACEOF
 
 
@@ -6611,6 +7718,9 @@ if $ac_need_defaults; then
   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
 fi
 
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
 # Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
@@ -6619,17 +7729,17 @@ $debug ||
 }
 
 # Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
 {
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=$TMPDIR/cs$$-$RANDOM
+  tmp=./confstat$$-$RANDOM
   (umask 077 && mkdir $tmp)
 } ||
 {
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
@@ -6713,6 +7823,10 @@ s,@PDFLATEX@,$PDFLATEX,;t t
 s,@DVIPDF@,$DVIPDF,;t t
 s,@EGREP@,$EGREP,;t t
 s,@M_OR_MM@,$M_OR_MM,;t t
+s,@include_dir_suffix@,$include_dir_suffix,;t t
+s,@lib_dir_suffix@,$lib_dir_suffix,;t t
+s,@docdir@,$docdir,;t t
+s,@sdcc_include_dir@,$sdcc_include_dir,;t t
 s,@sdcc_datadir@,$sdcc_datadir,;t t
 s,@OPT_ENABLE_UCSIM@,$OPT_ENABLE_UCSIM,;t t
 s,@OPT_ENABLE_DEVICE_LIB_BUILD@,$OPT_ENABLE_DEVICE_LIB_BUILD,;t t
@@ -7097,7 +8211,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
   cat $tmp/in >>$tmp/config.h
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
-    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
@@ -7166,8 +8280,11 @@ ac_clean_files=$ac_clean_files_save
 # need to make the FD available again.
 if test "$no_create" != yes; then
   ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
   exec 5>/dev/null
-  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
index 5396bad2af0335ca0b1f1af58dc187e7cfe98fb1..d72ebe4a50d4d6effde90a46119dd7e7299f10d5 100755 (executable)
@@ -57,7 +57,7 @@ AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html, :)
 AC_CHECK_PROG(PDFLATEX,   pdflatex,   pdflatex, :)
 AC_CHECK_PROG(DVIPDF,     dvipdf,     dvipdf, :)
 
-AC_DEFUN(SDCC_REQUIRE_PROG, 
+AC_DEFUN(SDCC_REQUIRE_PROG,
 [if test "$1" = ":"; then
   AC_MSG_ERROR([Cannot find required program $2.])
  fi
@@ -102,25 +102,202 @@ fi
 rm -f _test_.* a.out)
 ])
 
-# This macro _AC_DEFINEs VARNAME to the expansion of the DIR variable,
-# taking care of fixing up ${prefix} and such.
+# This macro expands DIR and assigns it to RET.
+# If DIR is NONE, then it's replaced by DEFAULT.
 #
-# Note that the 3 argument form is only supported with autoconf 2.13
-# and later (i.e. only where _AC_DEFINE supports 3 arguments).
+# Based on AC_DEFINE_DIR
 #
 # Examples:
 #
-#  AC_DEFINE_DIR(DATADIR, datadir)
-#  AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+#  AC_EXPAND(prefix, "/usr/local", expanded_prefix)
 
-AC_DEFUN([AC_DEFINE_DIR], [
+AC_DEFUN([AC_EXPAND], [
   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo [$]$2`
-  ac_define_dir=`eval echo [$]ac_define_dir`
-  ifelse($3, ,
-    AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
-    AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
+  ac_expand=[$]$1
+  test "x$ac_expand" = xNONE && ac_expand="[$]$2"
+  ac_expand=`eval echo [$]ac_expand`
+  $3=`eval echo [$]ac_expand`
+])
+
+# adl_NORMALIZE_PATH
+#
+#  - empty paths are changed to '.'
+#  - trailing slashes are removed
+#  - repeated slashes are squeezed except a leading doubled slash '//'
+#    (which might indicate a networked disk on some OS).
+#
+#
+# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
+# REFERENCE_STRING contains some backslashes, all slashes and backslashes
+# are turned into backslashes, otherwise they are all turned into slashes.
+#
+# This makes processing of DOS filenames quite easier, because you can turn a
+# filename to the Unix notation, make your processing, and turn it back to
+# original notation.
+
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/normpath.html
+dnl
+AC_DEFUN([adl_NORMALIZE_PATH],
+[case ":[$]$1:" in
+# change empty paths to '.'
+  ::) $1='.' ;;
+# strip trailing slashes
+  :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
+  :*:) ;;
+esac
+# squeze repeated slashes
+case ifelse($2,,"[$]$1",$2) in
+# if the path contains any backslashes, turn slashes into backslashes
+
+# Bernhard Held 2003-04-06
+# This was the original line. It doesn't:
+# - convert the first slash
+# - replace a slash with a double-backslash
+# *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) $1=`echo "[$]$1" | sed 's,[[\\/]][[\\/]]*,\1\\\\\\\\,g'` ;;
+
+# if the path contains slashes, also turn backslashes into slashes
+ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
+esac])
+
+
+# adl_COMPUTE_RELATIVE_PATH
+#
+# PATH_LIST is a space-separated list of colon-separated triplets of the form
+# 'FROM:TO:RESULT'. This function iterates over these triplets and set $RESULT
+# to the relative path from $FROM to $TO. Note that $FROM and $TO needs to be
+# absolute filenames for this macro to success.
+
+AC_DEFUN([adl_COMPUTE_RELATIVE_PATHS],
+[for _lcl_i in $1; do
+  _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'`
+  _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'`
+  _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'`
+  adl_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from])
+  adl_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to])
+  _lcl_notation="$_lcl_from$_lcl_to"
+  adl_NORMALIZE_PATH([_lcl_from],['/'])
+  adl_NORMALIZE_PATH([_lcl_to],['/'])
+  adl_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp])
+  adl_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"])
+  eval $_lcl_result_var='[$]_lcl_result_tmp'
+done])
+
+## Note:
+## *****
+## The following helper macros are too fragile to be used out
+## of adl_COMPUTE_RELATIVE_PATHS (mainly because they assume that
+## paths are normalized), that's why I'm keeping them in the same file.
+## Still, some of them maybe worth to reuse.
+
+dnl adl_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT)
+dnl ===========================================
+dnl Compute the relative path to go from $FROM to $TO and set the value
+dnl of $RESULT to that value.  This function work on raw filenames
+dnl (for instead it will considerate /usr//local and /usr/local as
+dnl two distinct paths), you should really use adl_COMPUTE_REALTIVE_PATHS
+dnl instead to have the paths sanitized automatically.
+dnl
+dnl For instance:
+dnl    first_dir=/somewhere/on/my/disk/bin
+dnl    second_dir=/somewhere/on/another/disk/share
+dnl    adl_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second)
+dnl will set $first_to_second to '../../../another/disk/share'.
+AC_DEFUN([adl_COMPUTE_RELATIVE_PATH],
+[adl_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix])
+adl_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel])
+adl_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix])
+$3="[$]_lcl_first_rel[$]_lcl_second_suffix"])
+
+dnl adl_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT)
+dnl ============================================
+dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT.
+dnl
+dnl For instance:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on/another/disk/share
+dnl    adl_COMPUTE_COMMON_PATH(first_path, second_path, common_path)
+dnl will set $common_path to '/somewhere/on'.
+AC_DEFUN([adl_COMPUTE_COMMON_PATH],
+[$3=''
+_lcl_second_prefix_match=''
+while test "[$]_lcl_second_prefix_match" != 0; do
+  _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"`
+  _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"`
+  if test "[$]_lcl_second_prefix_match" != 0; then
+    if test "[$]_lcl_first_prefix" != "[$]$3"; then
+      $3="[$]_lcl_first_prefix"
+    else
+      _lcl_second_prefix_match=0
+    fi
+  fi
+done])
+
+dnl adl_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT)
+dnl ==============================================
+dnl Substrack $SUBPATH from $PATH, and set the resulting suffix
+dnl (or the empty string if $SUBPATH is not a subpath of $PATH)
+dnl to $RESULT.
+dnl
+dnl For instace:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on
+dnl    adl_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path)
+dnl will set $common_path to '/my/disk/bin'.
+AC_DEFUN([adl_COMPUTE_SUFFIX_PATH],
+[$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`])
+
+dnl adl_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT)
+dnl ============================================
+dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that
+dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../'
+dnl should be needed to move from $PATH to $SUBPATH) and set the value
+dnl of $RESULT to that value.  If $SUBPATH is not a subpath of PATH,
+dnl set $RESULT to the empty string.
+dnl
+dnl For instance:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on
+dnl    adl_COMPUTE_BACK_PATH(first_path, second_path, back_path)
+dnl will set $back_path to '../../../'.
+AC_DEFUN([adl_COMPUTE_BACK_PATH],
+[adl_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix])
+$3=''
+_lcl_tmp='xxx'
+while test "[$]_lcl_tmp" != ''; do
+  _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"`
+  if test "[$]_lcl_first_suffix" != ''; then
+     _lcl_first_suffix="[$]_lcl_tmp"
+     $3="../[$]$3"
+  fi
+done])
+
+
+dnl adl_RECURSIVE_EVAL(VALUE, RESULT)
+dnl =================================
+dnl Interpolate the VALUE in loop until it doesn't change,
+dnl and set the result to $RESULT.
+dnl WARNING: It's easy to get an infinite loop with some unsane input.
+AC_DEFUN([adl_RECURSIVE_EVAL],
+[_lcl_receval="$1"
+$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
+       _lcl_receval_old="[$]_lcl_receval"
+       eval _lcl_receval="\"[$]_lcl_receval\""
+     done
+     echo "[$]_lcl_receval")`])
+
+
+# AC_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
+
+AC_DEFUN([AC_NORMALIZE_DEFINE_UNQUOTED], [
+  ac_ndu=[$]$1
+  adl_NORMALIZE_PATH([ac_ndu], [$]$3)
+  AC_DEFINE_UNQUOTED($2, "${ac_ndu}")
 ])
 
 
@@ -142,14 +319,15 @@ AC_SUBST(M_OR_MM)
 # This is the first time when CFLAGS are set/modified!!
 DD_COPT(CC, ggdb)
 if test "$sdcc_cv_CCggdb" = "yes"; then
-  CFLAGS="-ggdb -O2"
+  CFLAGS="-ggdb ${CFLAGS}"
 fi
 
 DD_COPT(CC, pipe)
 if test "$sdcc_cv_CCpipe" = "yes"; then
-  CFLAGS="$CFLAGS -pipe"
+  CFLAGS="-pipe $CFLAGS"
 fi
 
+
 # Checks for typedefs, structures, and compiler characteristics.
 # ===========================================================================
 AC_TYPE_SIGNAL
@@ -197,38 +375,133 @@ AC_C_BIGENDIAN
 
 # Set standard installation paths
 # ===========================================================================
-case $host in
-    *mingw32*)
-       MINGW32_HOST="yes"
-       ;;
-    *)
-       MINGW32_HOST="no"
-       ;;
-esac
+
+# In the Makefiles we need paths with '/' as directory separator, even if
+# crosscompiling for Win32.
+# And we want to preserve the macros (e.g. ${prefix}) in the Makefiles.
+# The variables in the Makefiles are replaced by AC_SUBST()
+#
+# In sdccconf.h the '/' in paths are replaced by "\\" (normalized).
+# The macros are expanded for the header.
+# The variables in the header are replaced by AC_*DEFINE*()
+
+AC_MSG_CHECKING(-mno-cygwin)
+  case ${CFLAGS} in
+      *-mno-cygwin*)
+         MINGW32_HOST="yes"
+         ;;
+      *)
+         MINGW32_HOST="no"
+         ;;
+  esac
+AC_MSG_RESULT($MINGW32_HOST)
 
 AC_MSG_CHECKING(host mingw32)
+  case ${host} in
+      *mingw32*)
+         MINGW32_HOST="yes"
+         ;;
+  esac
 AC_MSG_RESULT($MINGW32_HOST)
 
-# prefix: *nix default is "NONE"
-# prefix: mingw32 default is "/sdcc"
-if test "$prefix" = NONE; then
-    if test "$MINGW32_HOST" = "no"; then
-       prefix="/usr/local"
-    else
-       prefix="/sdcc"
-    fi
+if test "${MINGW32_HOST}" = "no"; then
+    dir_separator="/"
+else
+    dir_separator="\\\\"
 fi
 
-# datadir: *nix default is "${prefix}/share"
-if test "$datadir" = "\${prefix}/share"; then
-    if test "$MINGW32_HOST" = "no"; then
-       datadir="\${prefix}/share/sdcc"
-    fi
-# mingw32 default is "/sdcc"
-elif test "$datadir" = "/sdcc"; then
-    if test "$MINGW32_HOST" = "yes"; then
-       datadir="\${prefix}"
-    fi
+
+# Makefiles
+###########
+
+# include_dir_suffix:
+# *nix    default: "sdcc/include"
+# mingw32 default: "include"
+  if test "${MINGW32_HOST}" = "no"; then
+       include_dir_suffix="sdcc/include"
+  else
+       include_dir_suffix="include"
+  fi
+AC_SUBST(include_dir_suffix)
+
+# lib_dir_suffix:
+# *nix    default: "sdcc/lib"
+# mingw32 default: "lib"
+  if test "${MINGW32_HOST}" = "no"; then
+       lib_dir_suffix="sdcc/lib"
+  else
+       lib_dir_suffix="lib"
+  fi
+AC_SUBST(lib_dir_suffix)
+
+# docdir:
+# *nix    default: "${datadir}/sdcc/doc"
+# mingw32 default: "${datadir}/doc"
+  if test "${MINGW32_HOST}" = "no"; then
+       doc_suffix="/sdcc/doc"
+  else
+       doc_suffix="/doc"
+  fi
+  docdir="\${datadir}"${doc_suffix}
+AC_SUBST(docdir)
+
+# sdccconf.h
+############
+
+AC_DEFINE_UNQUOTED(DIR_SEPARATOR_STRING, "${dir_separator}")
+AC_DEFINE_UNQUOTED(DIR_SEPARATOR_CHAR  , '${dir_separator}')
+
+# prefix:
+# *nix    default: "NONE", ${ac_default_prefix}: "/usr/local"
+# mingw32 default: "/sdcc"
+AC_EXPAND(prefix, ac_default_prefix, expanded_prefix)
+AC_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, dir_separator)
+
+# exec_prefix:
+# default: "${prefix}"
+AC_EXPAND(exec_prefix, expanded_prefix, expanded_exec_prefix)
+AC_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, dir_separator)
+
+# bindir:
+# default: "${exec_prefix}/bin"
+AC_EXPAND(bindir, "NONE", expanded_bindir)
+AC_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, dir_separator)
+
+# datadir:
+# *nix    default: "${prefix}/share"
+# mingw32 default: "/sdcc"
+AC_EXPAND(datadir, "NONE", expanded_datadir)
+AC_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, dir_separator)
+
+# include/lib suffix
+norm_inc_dir_suffix=${include_dir_suffix}
+adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$dir_separator])
+AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX,
+                   DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}")
+norm_lib_dir_suffix=${lib_dir_suffix}
+adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$dir_separator])
+AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX,
+                   DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}")
+
+# relative paths
+adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir])
+adl_NORMALIZE_PATH(bin2data_dir, [$dir_separator])
+AC_DEFINE_UNQUOTED(BIN2DATA_DIR,
+                   DIR_SEPARATOR_STRING "${bin2data_dir}")
+
+adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_bindir:prefix2bin_dir])
+adl_NORMALIZE_PATH(prefix2bin_dir, [$dir_separator])
+AC_DEFINE_UNQUOTED(PREFIX2BIN_DIR,
+                   DIR_SEPARATOR_STRING "${prefix2bin_dir}")
+
+adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_datadir:prefix2data_dir])
+adl_NORMALIZE_PATH(prefix2data_dir, [$dir_separator])
+if test "${prefix2data_dir}" = "."; then
+    # small optimization for Mingw32; otherwise Borut will complain ;-)
+    AC_DEFINE_UNQUOTED(PREFIX2DATA_DIR, "")
+else
+    AC_DEFINE_UNQUOTED(PREFIX2DATA_DIR,
+                       DIR_SEPARATOR_STRING "${prefix2data_dir}")
 fi
 
 # standard libs
@@ -239,47 +512,33 @@ AC_DEFINE_UNQUOTED(STD_FP_LIB,    "libfloat")
 AC_DEFINE_UNQUOTED(STD_DS390_LIB, "libds390")
 AC_DEFINE_UNQUOTED(STD_xa51_LIB,  "xa51")
 
-AC_DEFINE_DIR(PREFIX,  "${prefix}")
-AC_DEFINE_DIR(DATADIR, "$datadir")
-AC_SUBST(datadir)
-
-# search paths
-bin_dir_suffix="bin"
-AC_DEFINE_DIR(BIN_DIR_SUFFIX, "${bin_dir_suffix}")
-
-    if test "$MINGW32_HOST" = "no"; then
-       search_suffix="share/sdcc"
-    else
-       search_suffix=""
-    fi
-AC_DEFINE_DIR(SEARCH_SUFFIX, "${search_suffix}")
-
-include_dir_suffix="include"
-AC_DEFINE_DIR(INCLUDE_DIR_SUFFIX, "${include_dir_suffix}")
-
-lib_dir_suffix="lib"
-AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX, "${lib_dir_suffix}")
-
 ### <Obsolete>
-# sdcc_datadir is still used in [device,lib]/Makefile
-sdcc_datadir=${datadir}
+sdcc_include_dir="\${datadir}/${include_dir_suffix}"
+AC_SUBST(sdcc_include_dir)
+AC_EXPAND(sdcc_include_dir,
+          "NONE", expanded_sdcc_include_dir)
+AC_DEFINE_UNQUOTED(SDCC_INCLUDE_DIR, "${expanded_sdcc_include_dir}")
+
+sdcc_lib_dir="\${datadir}/\${lib_dir_suffix}"
+# AC_SUBST(sdcc_lib_dir)
+AC_EXPAND(sdcc_lib_dir,
+          "NONE", expanded_sdcc_lib_dir)
+AC_DEFINE_UNQUOTED(SDCC_LIB_DIR, "${expanded_sdcc_lib_dir}")
+
+sdcc_datadir=${datadir}/sdcc
 AC_SUBST(sdcc_datadir)
 
-# SDCC_[INCLUDE,LIB]_DIR is still used in SDCCmain.c
-if test "${includedir}" = "\${prefix}/include"; then
-    includedir="${datadir}/include"
-fi
-AC_DEFINE_DIR(SDCC_INCLUDE_DIR, "${includedir}")
-AC_DEFINE_DIR(SDCC_LIB_DIR,     "${datadir}/lib")
 ### </Obsolete>
 
 # environment variables
 sdcc_dir_name="SDCC_HOME"
-AC_DEFINE_DIR(SDCC_DIR_NAME, "${sdcc_dir_name}")
+AC_DEFINE_UNQUOTED(SDCC_DIR_NAME, "${sdcc_dir_name}")
+
 sdcc_include_name="SDCC_INCLUDE"
-AC_DEFINE_DIR(SDCC_INCLUDE_NAME, "${sdcc_include_name}")
+AC_DEFINE_UNQUOTED(SDCC_INCLUDE_NAME, "${sdcc_include_name}")
+
 sdcc_lib_name="SDCC_LIB"
-AC_DEFINE_DIR(SDCC_LIB_NAME, "${sdcc_lib_name}")
+AC_DEFINE_UNQUOTED(SDCC_LIB_NAME, "${sdcc_lib_name}")
 
 # Now handle the port selection
 # ===========================================================================
index 570e11777021e622b7ca4ef8a5804cb621f829a7..8616060f4f8934218a4458806d5ebabc7917496b 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 1.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 220
+#LyX 1.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 221
 \textclass article
 \language english
 \inputencoding default
@@ -330,7 +330,7 @@ If you can think of some more, please send them to the list.
 Installation
 \layout Subsection
 
-Install paths
+Configure variables
 \layout Standard
 
 The install paths and default search paths are defined when running 'configure'.
@@ -338,7 +338,7 @@ The install paths and default search paths are defined when running 'configure'.
 \layout Standard
 
 ...
- TBA
+ TBD
 \newline 
 
 \newline 
@@ -348,21 +348,41 @@ These configure variables are compiled into the binaries, and can only be
 \emph on 
 italics
 \emph default 
- to distinguish them from run time variables (see next section).
+ to distinguish them from run time environment variables (see section search
+ paths).
+\newline 
+
+\newline 
+Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds.
+ The SDCC team uses Mingw32 to build the official Windows binaries, because
+ it's
+\layout Enumerate
+
+open source, 
+\layout Enumerate
+
+a gcc compiler and last but not least
+\layout Enumerate
+
+the binaries can be built by cross compiling on Sourceforge's compile farm.
+\layout Standard
+
+The other Win32 builds using Borland, VC or whatever don't use 'configure',
+ but they (hopefully) use the default Win32 paths.
 \newline 
 
 \newline 
-The defaults are:
+These defaults are:
 \newline 
 
 \newline 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="7" columns="3">
+<lyxtabular version="3" rows="8" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -427,7 +447,7 @@ sdcc
 
 
 \emph on 
-DATADIR
+EXEC_PREFIX
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -438,8 +458,6 @@ DATADIR
 
 \emph on 
 $PREFIX
-\emph default 
-/share/sdcc
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -461,7 +479,7 @@ $PREFIX
 
 
 \emph on 
-BIN_DIR_SUFFIX
+BINDIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -469,7 +487,11 @@ BIN_DIR_SUFFIX
 
 \layout Standard
 
-bin
+
+\emph on 
+$EXECPREFIX
+\emph default 
+/bin
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -477,6 +499,12 @@ bin
 
 \layout Standard
 
+
+\emph on 
+$EXECPREFIX
+\emph default 
+
+\backslash 
 bin
 \end_inset 
 </cell>
@@ -489,7 +517,7 @@ bin
 
 
 \emph on 
-SEARCH_SUFFIX
+DATADIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -497,7 +525,45 @@ SEARCH_SUFFIX
 
 \layout Standard
 
-share/sdcc
+
+\emph on 
+$PREFIX
+\emph default 
+/share
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+$PREFIX
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+DOCDIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+$DATADIR
+\emph default 
+/sdcc/doc
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -505,6 +571,13 @@ share/sdcc
 
 \layout Standard
 
+
+\emph on 
+$DATADIR
+\emph default 
+
+\backslash 
+doc
 \end_inset 
 </cell>
 </row>
@@ -524,7 +597,7 @@ INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-include
+sdcc/include
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -552,7 +625,7 @@ LIB_DIR_SUFFIX
 
 \layout Standard
 
-lib
+sdcc/lib
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -572,25 +645,142 @@ lib
 \newline 
 
 \newline 
-Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds.
- The SDCC team uses Mingw32 to build the official Windows binaries, because
- it's
-\layout Enumerate
 
-open source, 
-\layout Enumerate
+\newline 
+'configure' also computes relative paths.
+ This is needed for full relocatability of a binary package and to complete
+ search paths (see section search paths below):
+\newline 
+\newline 
 
-a gcc compiler and last but not least
-\layout Enumerate
+\begin_inset  Tabular
+<lyxtabular version="3" rows="4" columns="3">
+<features>
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-the binaries can be built by cross compiling on Sourceforge's compile farm.
 \layout Standard
 
-The other Win32 builds using Borland, VC or whatever don't use 'configure',
- but they (hopefully) use the default Win32 paths.
-\newline 
+Variable (computed)
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+*nix default
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Win32 default
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+BIN2DATA_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+../share
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+..
+\backslash 
+
+\end_inset 
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+PREFIX2BIN_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset 
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+PREFIX2DATA_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+share/sdcc
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\layout Subsection
+
+Install paths
+\layout Standard
 
-\newline 
 1.
  Binary files (preprocessor, assembler and linker)
 \layout Standard
@@ -599,9 +789,9 @@ The other Win32 builds using Borland, VC or whatever don't use 'configure',
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -636,7 +826,7 @@ Win32 default
 
 
 \emph on 
-$PREFIX/$BIN_DIR_SUFFIX
+$EXEC_PREFIX
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -676,9 +866,9 @@ bin
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.6in">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.6in">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -760,9 +950,9 @@ model
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -837,9 +1027,9 @@ lib
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -874,9 +1064,7 @@ Win32 default
 
 
 \emph on 
-$DATADIR/
-\emph default 
-doc
+$DOCDIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -916,7 +1104,7 @@ Some search paths or parts of them are determined by configure variables
 italics
 \emph default 
 , see section above).
Other search paths are determined by environment variables during runtime.
Further search paths are determined by environment variables during runtime.
  
 \newline 
 The paths searched when running the compiler are as follows (the first catch
@@ -931,9 +1119,9 @@ The paths searched when running the compiler are as follows (the first catch
 \begin_inset  Tabular
 <lyxtabular version="3" rows="4" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -968,7 +1156,7 @@ Win32 default
 
 $SDCC_HOME/
 \emph on 
-$BIN_DIR_SUFFIX
+$PPREFIX2BIN_DIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -1057,9 +1245,9 @@ $PATH
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -1118,7 +1306,7 @@ Win32 default
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -1126,7 +1314,7 @@ $SDCC_INCLUDE_PATH
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1134,7 +1322,7 @@ $SDCC_INCLUDE_PATH
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 </row>
@@ -1148,7 +1336,7 @@ $SDCC_HOME/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
 \newline 
 $INCLUDE_DIR_SUFFIX
 \end_inset 
@@ -1158,7 +1346,7 @@ $INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-$SDCC_HOME/
+$SDCC_ HOME/
 \newline 
 share/sdcc/
 \newline 
@@ -1182,11 +1370,11 @@ include
 
 \layout Standard
 
-path(argv[0])/../
+path(argv[0])/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
 \emph default 
 
 \newline 
@@ -1200,7 +1388,9 @@ $INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-(not on *nix)
+path(argv[0])/
+\newline 
+../sdcc/include
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1287,9 +1477,9 @@ model
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.7in">
-<column alignment="left" valignment="top" leftline="true" width="1.2in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="1.2in">
+<column alignment="block" valignment="top" leftline="true" width="1.7in">
+<column alignment="block" valignment="top" leftline="true" width="1.2in">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="1.2in">
 <row topline="true" bottomline="true">
 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -1348,7 +1538,7 @@ Win32 default
 
 \layout Standard
 
-$SDCC_LIB_PATH/
+$SDCC_LIB/
 \newline 
 
 \emph on 
@@ -1360,7 +1550,7 @@ $SDCC_LIB_PATH/
 
 \layout Standard
 
-$SDCC_LIB_PATH/
+$SDCC_LIB/
 \newline 
 
 \emph on 
@@ -1372,7 +1562,7 @@ $SDCC_LIB_PATH/
 
 \layout Standard
 
-$SDCC_LIB_PATH
+$SDCC_LIB
 \backslash 
 
 \newline 
@@ -1392,7 +1582,7 @@ $SDCC_HOME/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
 \newline 
 $LIB_DIR_SUFFIX/<model>
 \end_inset 
@@ -1434,12 +1624,16 @@ lib
 
 \layout Standard
 
-path(argv[0]/../
+path(argv[0]/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
+\emph default 
+
 \newline 
+
+\emph on 
 $LIB_DIR_SUFFIX/<model>
 \end_inset 
 </cell>
@@ -1448,47 +1642,11 @@ $LIB_DIR_SUFFIX/<model>
 
 \layout Standard
 
-(not on *nix)
+path(argv[0])/
 \newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-
+../sdcc/lib/
+\emph on 
+<model>
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1498,56 +1656,15 @@ $LIB_DIR_SUFFIX/<model>
 
 path(argv[0]
 \backslash 
+
+\newline 
 ..
 \backslash 
 lib
 \backslash 
 
 \emph on 
-
-\newline 
 <model>
-\newline 
-
-\emph default 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-
 \end_inset 
 </cell>
 </row>
@@ -1592,7 +1709,7 @@ lib/
 
 \layout Comment
 
-Don't delete any of the stray spaces in the table line 5 without checking
+Don't delete any of the stray spaces in the table above without checking
  the HTML output (last line)!
 \layout Standard
 
@@ -1696,6 +1813,15 @@ Type
 \series default 
  This copies the binary executables, the include files, the libraries and
  the documentation to the install directories.
+\layout Standard
+
+On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelease
+)) fails to compile SDCC.
+ Fortunately there's also gcc 2.9.x installed, which works fine.
+ This compiler can be selected by running 'configure' with:
+\layout LyX-Code
+
+./configure CC=gcc2 CXX=g++2
 \layout Subsection
 
 Windows 
@@ -3614,33 +3740,13 @@ TMPDIR
 
 
 \series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_BIN_PATH)
-\series default 
- Path, see 
-\begin_inset Quotes sld
-\end_inset 
-
-2.1 Install and search paths
-\begin_inset Quotes srd
-\end_inset 
-
-.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_INCLUDE_PATH)
+SDCC_HOME
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -3650,15 +3756,13 @@ SDCC_INCLUDE_PATH)
 
 
 \series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_LIB_PATH)
+SDCC_INCLUDE
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -3668,17 +3772,13 @@ SDCC_LIB_PATH)
 
 
 \series bold 
-SDCCDIR\SpecialChar ~
-(soon\SpecialChar ~
-replaced\SpecialChar ~
-by:\SpecialChar ~
-SDCCPATH)
+SDCC_LIB
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -4174,9 +4274,9 @@ Interrupt Numbers and the corresponding address & descriptions for the Standard
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
index 6700fd14f37629a4bfe34b68db0920f0b103764f..19e6e0f46ce5063e5e6b9df1fdbf4a0fdeddee1d 100644 (file)
 #define __FUNCTION__  __FILE__
 #endif
 
-#undef PREFIX
-#undef DATADIR
-#undef SRCDIR
+#define DIR_SEPARATOR_STRING "\\"
+#define DIR_SEPARATOR_CHAR   '\\'
 
 #define PREFIX                "\\sdcc"
+#define EXEC_PREFIX           "\\sdcc"
+#define BIN_PREFIX            "\\sdcc\\bin"
 #define DATADIR               "\\sdcc"
 
-#define BIN_DIR_SUFFIX        "bin"
-#define SEARCH_SUFFIX         ""
-#define INCLUDE_DIR_SUFFIX    "include"
-#define LIB_DIR_SUFFIX        "lib"
+#define INCLUDE_DIR_SUFFIX    "\\include"
+#define LIB_DIR_SUFFIX        "\\lib"
+
+#define BIN2DATA_DIR          "\\.."
+#define PREFIX2BIN_DIR        "\\bin"
+#define PREFIX2DATA_DIR       ""
 
 // Obsolete:
 #define SDCC_INCLUDE_DIR      "\\sdcc\\include"
index e6c7bd70be3253683fa3e92ccba9c2b40b378a73..f4e17026cf7273c82dd219168aa5c11e7b72d9cf 100644 (file)
 #undef SDCC_VERSION_P
 #undef SDCC_VERSION_STR
 
+#undef DIR_SEPARATOR_STRING
+#undef DIR_SEPARATOR_CHAR
+
 #undef PREFIX
+#undef EXEC_PREFIX
+#undef BINDIR
 #undef DATADIR
 
-#undef BIN_DIR_SUFFIX
-#undef SEARCH_SUFFIX
 #undef INCLUDE_DIR_SUFFIX
 #undef LIB_DIR_SUFFIX
 
+#undef BIN2DATA_DIR
+#undef PREFIX2BIN_DIR
+#undef PREFIX2DATA_DIR
+
 // Obsolete:
 #undef SDCC_INCLUDE_DIR
 #undef SDCC_LIB_DIR
index 175aaa2bdde1ea5d4f860b1b245fffde04d4665a..fea1f48ab0293c34fd992d189bfd1e14108deb77 100644 (file)
  * Define host port dependant constants etc.
  */
 
-#define DOS_DIR_SEPARATOR_CHAR     '\\'
-#define DOS_DIR_SEPARATOR_STRING   "\\"
 #define UNIX_DIR_SEPARATOR_CHAR    '/'
-#define UNIX_DIR_SEPARATOR_STRING  "/"
 
 #ifdef _WIN32       /* WIN32 native */
 
-#define NATIVE_WIN32           1
-#ifdef __MINGW32__  /* GCC MINGW32 depends on configure */
-#include "sdccconf.h"
-#else
-#include "sdcc_vc.h"
-#define PATH_MAX                _MAX_PATH
-#endif
-#define DIR_SEPARATOR_CHAR     DOS_DIR_SEPARATOR_CHAR
-#define DIR_SEPARATOR_STRING   DOS_DIR_SEPARATOR_STRING
+#  define NATIVE_WIN32                 1
+#  ifdef __MINGW32__  /* GCC MINGW32 depends on configure */
+#    include "sdccconf.h"
+#  else
+#    include "sdcc_vc.h"
+#    define PATH_MAX  _MAX_PATH
+#  endif
 
 #else               /* Assume Un*x style system */
-
-#include "sdccconf.h"
-#define DIR_SEPARATOR_CHAR         UNIX_DIR_SEPARATOR_CHAR
-#define DIR_SEPARATOR_STRING       UNIX_DIR_SEPARATOR_STRING
-
+#  include "sdccconf.h"
 #endif
 
 #include "SDCCerr.h"
 
 #include <limits.h>            /* PATH_MAX                  */
 #ifndef PATH_MAX               /* POSIX, but not required   */
-#define PATH_MAX 255           /* define a reasonable value */
+#  define PATH_MAX 255         /* define a reasonable value */
 #endif
 
 #define  MAX_REG_PARMS  1
 typedef int bool;
 
 #ifndef max
-#define max(a,b) (a > b ? a : b)
+#  define max(a,b) (a > b ? a : b)
 #endif
 
 #ifndef min
-#define min(a,b) (a < b ? a : b)
+#  define min(a,b) (a < b ? a : b)
 #endif
 
 #ifndef THROWS
index 5a635391833f7dbcf1b522d0efbbe7f1a1a75221..ad9a1a4c9e38401ffa555dbf2792f222992d3218 100644 (file)
@@ -28,9 +28,6 @@
 #include "SDCChasht.h"
 #include <stdarg.h>
 
-/* PENDING: Hacks as I can't work autoconf */
-#define BINDIR PREFIX "/bin"
-
 /** Given an array of name, value string pairs creates a new hash
     containing all of the pairs.
 */
index 6992f6443901f3163adb55e6362fa6994a2a1af7..a1fb8d56438c52a5e6c2e11804d875766c68ee2f 100644 (file)
@@ -34,6 +34,7 @@ srcdir = @srcdir@
 
 
 LIBS = @LIBS@
+CFLAGS = @CFLAGS@
 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \
   $(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)