* Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 2 Apr 2003 20:12:06 +0000 (20:12 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 2 Apr 2003 20:12:06 +0000 (20:12 +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@2465 4a8a32a2-be11-0410-ad9d-d568d2c75423

Makefile.common.in
configure
configure.in
doc/Makefile
sdcc_vc_in.h
sdccconf_in.h

index 0070afc43b84fdd575e9c323142df91b454d51ed..eb8abd765338eee9836471ead0d0dc626857d230 100644 (file)
@@ -2,9 +2,6 @@
 #
 #
 
-# HACK
-PORT           = mcs51
-
 # Version
 VERSION         = @VERSION@
 VERSIONHI       = @VERSIONHI@
@@ -32,7 +29,7 @@ man1dir         = $(mandir)/man1
 man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
-docdir          = @datadir@/sdcc/doc
+docdir          = @datadir@/doc
 
 # Modules to enable/disable
 OPT_ENABLE_UCSIM = @OPT_ENABLE_UCSIM@
@@ -57,8 +54,6 @@ EXTRALIBS     = @LIBS@
 # directory.
 
 # Library compilation options
-SCC = $(PRJDIR)/src/sdcc
-SAS = $(PRJDIR)/as/$(PORT)/as
 CLEANSPEC = *.lst *.asm *.sym *~ *.cdb *.dep *.rul
 
 OBJ = $(SOURCES:.c=.o)
index 7b72ebd2d0278925fe10678c64ef9c786c20c8d3..a828681467e461fcca0fa9fd3949615b1808a6f2 100755 (executable)
--- a/configure
+++ b/configure
@@ -308,7 +308,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 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 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.
@@ -858,11 +858,13 @@ Optional Features:
   --disable-avr-port      Excludes the AVR port
   --disable-ds390-port    Excludes the DS390 port
   --disable-pic-port      Excludes the PIC port
-  --disable-xa51-port Excludes the XA51 port
+  --disable-xa51-port     Excludes the XA51 port
   --disable-ucsim         Disables configuring and building of ucsim
-  --disable-device-lib-build Disables automatically building device libraries
+  --disable-device-lib-build
+                          Disables automatically building device libraries
   --disable-packihx       Disables building packihx
-  --enable-libgc          Use the Bohem memory allocator.  Lower runtime footprint.
+  --enable-libgc          Use the Bohem memory allocator. Lower runtime
+                          footprint.
 
 Some influential environment variables:
   CC          C compiler command
@@ -1251,6 +1253,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
           ac_config_headers="$ac_config_headers sdccconf.h:sdccconf_in.h"
 
 
@@ -1350,8 +1353,9 @@ sdcc_cv_versionhi=$VERSIONHI
 sdcc_cv_versionlo=$VERSIONLO
 sdcc_cv_versionp=$VERSIONP
 
+
 # Required programs
-#-------------------
+# ===========================================================================
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3080,8 +3084,10 @@ _ACEOF
 fi
 
 fi
-# Extract the first word of "bison", so it can be a program name with args.
-set dummy bison; ac_word=$2
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_YACC+set}" = set; then
@@ -3097,14 +3103,13 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_YACC="bison -y"
+    ac_cv_prog_YACC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
 
-  test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
 fi
 fi
 YACC=$ac_cv_prog_YACC
@@ -3116,6 +3121,10 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
 # Extract the first word of "autoconf", so it can be a program name with args.
 set dummy autoconf; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3261,6 +3270,187 @@ echo "${ECHO_T}no" >&6
 fi
 
 
+# Extract the first word of "lyx", so it can be a program name with args.
+set dummy lyx; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LYX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LYX"; then
+  ac_cv_prog_LYX="$LYX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LYX="lyx"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_LYX" && ac_cv_prog_LYX=":"
+fi
+fi
+LYX=$ac_cv_prog_LYX
+if test -n "$LYX"; then
+  echo "$as_me:$LINENO: result: $LYX" >&5
+echo "${ECHO_T}$LYX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "latex", so it can be a program name with args.
+set dummy latex; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LATEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LATEX"; then
+  ac_cv_prog_LATEX="$LATEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LATEX="latex"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_LATEX" && ac_cv_prog_LATEX=":"
+fi
+fi
+LATEX=$ac_cv_prog_LATEX
+if test -n "$LATEX"; then
+  echo "$as_me:$LINENO: result: $LATEX" >&5
+echo "${ECHO_T}$LATEX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "latex2html", so it can be a program name with args.
+set dummy latex2html; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LATEX2HTML+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LATEX2HTML"; then
+  ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LATEX2HTML="latex2html"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_LATEX2HTML" && ac_cv_prog_LATEX2HTML=":"
+fi
+fi
+LATEX2HTML=$ac_cv_prog_LATEX2HTML
+if test -n "$LATEX2HTML"; then
+  echo "$as_me:$LINENO: result: $LATEX2HTML" >&5
+echo "${ECHO_T}$LATEX2HTML" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "pdflatex", so it can be a program name with args.
+set dummy pdflatex; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PDFLATEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PDFLATEX"; then
+  ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PDFLATEX="pdflatex"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_PDFLATEX" && ac_cv_prog_PDFLATEX=":"
+fi
+fi
+PDFLATEX=$ac_cv_prog_PDFLATEX
+if test -n "$PDFLATEX"; then
+  echo "$as_me:$LINENO: result: $PDFLATEX" >&5
+echo "${ECHO_T}$PDFLATEX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "dvipdf", so it can be a program name with args.
+set dummy dvipdf; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DVIPDF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DVIPDF"; then
+  ac_cv_prog_DVIPDF="$DVIPDF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DVIPDF="dvipdf"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_DVIPDF" && ac_cv_prog_DVIPDF=":"
+fi
+fi
+DVIPDF=$ac_cv_prog_DVIPDF
+if test -n "$DVIPDF"; then
+  echo "$as_me:$LINENO: result: $DVIPDF" >&5
+echo "${ECHO_T}$DVIPDF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
 
 
 if test "$YACC" = ":"; then
@@ -3283,6 +3473,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
 # Checking for header files.
 # ===========================================================================
 
@@ -3499,7 +3690,7 @@ done
 
 
 
-for ac_header in getopt.h
+for ac_header in sys/socket.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
 done
 
 
-for ac_header in unistd.h
+
+# Checking for functions
+# ===========================================================================
+
+for ac_func in strerror
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $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;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+eval "$as_ac_var=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+fi
+done
+
+
+
+
+
+for ac_func in vsnprintf snprintf vsprintf mkstemp
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in malloc.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in sys/isa_defs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in sys/socket.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_opendir="none required"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
-  for ac_lib in dir; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_opendir="-l$ac_lib"
-break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
-  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
-
-fi
-
-else
-  echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_opendir="none required"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
-  for ac_lib in x; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_opendir="-l$ac_lib"
-break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
-  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
-
-fi
-
-fi
-
-
-# This must be after CPP
-
-echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
-echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
-if test "${s51_cv_fd+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  sdcc_cv_fd="unknown"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#include <sys/time.h>
-#ifdef FD_ZERO
-yes
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  sdcc_cv_fd="<sys/time.h>"
-fi
-rm -f conftest*
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#include <sys/types.h>
-#ifdef FD_ZERO
-yes
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  sdcc_cv_fd="<sys/types.h>"
-fi
-rm -f conftest*
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#include <sys/select.h>
-#ifdef FD_ZERO
-yes
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  sdcc_cv_fd="<sys/types.h>"
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $s51_cv_fd" >&5
-echo "${ECHO_T}$s51_cv_fd" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define FD_HEADER_OK 0
-_ACEOF
-
-if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_TIME_H 1
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define FD_HEADER_OK 1
-_ACEOF
-
-else
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_TIME_H 0
-_ACEOF
-
-fi
-if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_TYPES_H 1
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define FD_HEADER_OK 1
-_ACEOF
-
-else
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_TYPES_H 0
-_ACEOF
-
-fi
-if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_SELECT_H 1
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define FD_HEADER_OK 1
-_ACEOF
-
-else
-cat >>confdefs.h <<\_ACEOF
-#define FD_NEED_SELECT_H 0
-_ACEOF
-
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HEADER_FD ${sdcc_cv_fd}
-_ACEOF
-
-
-
-# Checking for functions
-# ===========================================================================
-
-
-
-
-
-
-
-
-for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $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;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
-
-for ac_func in strchr memcpy vsnprintf snprintf vsprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $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;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in mkstemp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $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;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in fgets
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $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;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in yylex
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $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;
-#endif
-
-  ;
-  return 0;
-}
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $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;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -4802,202 +3951,9 @@ fi
 done
 
 
-# check if -lsocket && -lxnet is required to compile socket stuff
-echo "$as_me:$LINENO: checking for library containing socket" >&5
-echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
-if test "${ac_cv_search_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_socket=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char socket ();
-int
-main ()
-{
-socket ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_socket="none required"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_socket" = no; then
-  for ac_lib in socket; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char socket ();
-int
-main ()
-{
-socket ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_socket="-l$ac_lib"
-break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
-echo "${ECHO_T}$ac_cv_search_socket" >&6
-if test "$ac_cv_search_socket" != no; then
-  test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
-
-fi
-
-echo "$as_me:$LINENO: checking for library containing inet_addr" >&5
-echo $ECHO_N "checking for library containing inet_addr... $ECHO_C" >&6
-if test "${ac_cv_search_inet_addr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_inet_addr=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char inet_addr ();
-int
-main ()
-{
-inet_addr ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_inet_addr="none required"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_inet_addr" = no; then
-  for ac_lib in nsl xnet; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char inet_addr ();
-int
-main ()
-{
-inet_addr ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_inet_addr="-l$ac_lib"
-break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_inet_addr" >&5
-echo "${ECHO_T}$ac_cv_search_inet_addr" >&6
-if test "$ac_cv_search_inet_addr" != no; then
-  test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
-
-fi
-
 
 # Macro definitions
-###################
+# ===========================================================================
 
 # DD_COPT macro checks if the compiler specified as the 1st parameter
 # supports option specified as the 2nd parameter
@@ -5005,9 +3961,22 @@ fi
 
 
 
+# This macro _AC_DEFINEs VARNAME to the expansion of the DIR variable,
+# taking care of fixing up ${prefix} and such.
+#
+# Note that the 3 argument form is only supported with autoconf 2.13
+# and later (i.e. only where _AC_DEFINE supports 3 arguments).
+#
+# Examples:
+#
+#  AC_DEFINE_DIR(DATADIR, datadir)
+#  AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+
+
+
 
 # Checking characteristics of compilers and other programs
-# --------------------------------------------------------
+# ===========================================================================
 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
 if test "${sdcc_cv_MM+set}" = set; then
@@ -5079,7 +4048,6 @@ if test "$sdcc_cv_CCpipe" = "yes"; then
   CFLAGS="$CFLAGS -pipe"
 fi
 
-
 # Checks for typedefs, structures, and compiler characteristics.
 # ===========================================================================
 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
@@ -5138,7 +4106,6 @@ _ACEOF
 
 
 
-if test "$cross_compiling" = "no"; then
 echo "$as_me:$LINENO: checking for char" >&5
 echo $ECHO_N "checking for char... $ECHO_C" >&6
 if test "${ac_cv_type_char+set}" = set; then
@@ -6419,17 +5386,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-else
-    if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
-       ac_cv_sizeof_char=1
-       ac_cv_sizeof_short=2
-       ac_cv_sizeof_int=4
-       ac_cv_sizeof_long=4
-    else
-       : # FIXME
-    fi
-#echo
-fi
 
 type_name()
 {
@@ -6665,51 +5621,45 @@ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 esac
 
 
-#
-#
-if test "${prefix}" = "NONE"; then
-    prefix="/usr/local"
-fi
-
-config_in=`pwd`
-sdcc_datadir=${datadir}/sdcc
+# Set standard installation paths
+# ===========================================================================
+case $host in
+    *mingw32*)
+       MINGW32_HOST="yes"
+       ;;
+    *)
+       MINGW32_HOST="no"
+       ;;
+esac
 
+echo "$as_me:$LINENO: checking host mingw32" >&5
+echo $ECHO_N "checking host mingw32... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $MINGW32_HOST" >&5
+echo "${ECHO_T}$MINGW32_HOST" >&6
 
-# For some unknown reason, putting this assignment in a subshell
-# like this causes the rvalue to be fully substituted. We need this
-# for the defines below to generate the right thing. We keep this
-# separate from the substituted sdcc_datadir because we want the
-# latter for makefiles.
-if test "${datadir}" = "\${prefix}/share"; then
-    sdcc_datadir_tmp=${prefix}/share/sdcc
-else
-    sdcc_datadir_tmp=${datadir}/sdcc
+# 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
 fi
 
-if test "${includedir}" = "\${prefix}/include"; then
-   cat >>confdefs.h <<_ACEOF
-#define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
-_ACEOF
-
-   cat >>confdefs.h <<_ACEOF
-#define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
-_ACEOF
-
-else
-   cat >>confdefs.h <<_ACEOF
-#define STANDARD_INCLUDE_DIR "${includedir}"
-_ACEOF
-
-   cat >>confdefs.h <<_ACEOF
-#define SDCC_INCLUDE_DIR "${includedir}"
-_ACEOF
-
+# 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
 
-cat >>confdefs.h <<_ACEOF
-#define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
-_ACEOF
-
+# standard libs
 cat >>confdefs.h <<_ACEOF
 #define STD_LIB "libsdcc"
 _ACEOF
@@ -6735,22 +5685,143 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define PREFIX "${prefix}"
+
+  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`
+  cat >>confdefs.h <<_ACEOF
+#define PREFIX "$ac_define_dir"
 _ACEOF
 
-cat >>confdefs.h <<_ACEOF
-#define DATADIR "${sdcc_datadir_tmp}"
+
+
+  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`
+  cat >>confdefs.h <<_ACEOF
+#define DATADIR "$ac_define_dir"
+_ACEOF
+
+
+
+
+# search paths
+bin_dir_suffix="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`
+  cat >>confdefs.h <<_ACEOF
+#define BIN_DIR_SUFFIX "$ac_define_dir"
+_ACEOF
+
+
+
+    if test "$MINGW32_HOST" = "no"; then
+       search_suffix="share/sdcc"
+    else
+       search_suffix=""
+    fi
+
+  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`
+  cat >>confdefs.h <<_ACEOF
+#define SEARCH_SUFFIX "$ac_define_dir"
+_ACEOF
+
+
+
+include_dir_suffix="include"
+
+  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"
 _ACEOF
 
+
+
+lib_dir_suffix="lib"
 cat >>confdefs.h <<_ACEOF
-#define SRCDIR "${config_in}"
+#define LIB_DIR_SUFFIX "${lib_dir_suffix}"
+_ACEOF
+
+
+### <Obsolete>
+# sdcc_datadir is still used in [device,lib]/Makefile
+sdcc_datadir=${datadir}
+
+
+# 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"
+_ACEOF
+
+
+
+  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"
+_ACEOF
+
+
+### </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"
+_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"
 _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"
+_ACEOF
+
 
 
 # Now handle the port selection
+# ===========================================================================
 rm -f ports.all ports.build
 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
 if test "${enable_mcs51_port+set}" = set; then
@@ -7011,10 +6082,8 @@ subdirs="$subdirs packihx"
 
 subdirs="$subdirs sim/ucsim"
 
-# MLH: removed as the rules are already in Makefile.common
-#as/z80/Makefile
-#link/z80/Makefile
                                                                       ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile as/mcs51/Makefile device/include/Makefile device/lib/Makefile debugger/mcs51/Makefile Makefile.common:Makefile.common.in"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -7637,6 +6706,11 @@ s,@AUTOCONF@,$AUTOCONF,;t t
 s,@STRIP@,$STRIP,;t t
 s,@AS@,$AS,;t t
 s,@CP@,$CP,;t t
+s,@LYX@,$LYX,;t t
+s,@LATEX@,$LATEX,;t t
+s,@LATEX2HTML@,$LATEX2HTML,;t t
+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,@sdcc_datadir@,$sdcc_datadir,;t t
index e46aae401e5223cbd3e3ae6a5291c3278248aa49..5396bad2af0335ca0b1f1af58dc187e7cfe98fb1 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-AC_INIT(Makefile)
+AC_PREREQ(2.54)
+AC_INIT
+AC_CONFIG_SRCDIR([Makefile])
 AC_CONFIG_HEADER(sdccconf.h:sdccconf_in.h)
 
 AC_PROG_AWK
@@ -34,20 +36,27 @@ sdcc_cv_versionhi=$VERSIONHI
 sdcc_cv_versionlo=$VERSIONLO
 sdcc_cv_versionp=$VERSIONP
 
+
 # Required programs
-#-------------------
+# ===========================================================================
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_RANLIB
-AC_PROG_LEX(flex, :)
-AC_CHECK_PROG(YACC, bison, bison -y, :)
+AC_PROG_LEX
+AC_PROG_YACC
 AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, :)
 AC_CHECK_PROG(STRIP, strip, strip, :)
 AC_CHECK_PROG(AS, as, as, :)
 AC_CHECK_PROG(CP, cp, cp, :)
 
+AC_CHECK_PROG(LYX,        lyx,        lyx, :)
+AC_CHECK_PROG(LATEX,      latex,      latex, :)
+AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html, :)
+AC_CHECK_PROG(PDFLATEX,   pdflatex,   pdflatex, :)
+AC_CHECK_PROG(DVIPDF,     dvipdf,     dvipdf, :)
+
 AC_DEFUN(SDCC_REQUIRE_PROG, 
 [if test "$1" = ":"; then
   AC_MSG_ERROR([Cannot find required program $2.])
@@ -57,77 +66,22 @@ AC_DEFUN(SDCC_REQUIRE_PROG,
 SDCC_REQUIRE_PROG($YACC, bison)
 SDCC_REQUIRE_PROG($LEX, lex)
 
-AC_LANG_C
+AC_LANG([C])
+
 
 # Checking for header files.
 # ===========================================================================
-AC_HEADER_STDC
-AC_CHECK_HEADERS(getopt.h)
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(malloc.h)
-AC_CHECK_HEADERS(sys/isa_defs.h)
 AC_CHECK_HEADERS(sys/socket.h)
-AC_HEADER_DIRENT
-
-# This must be after CPP
-
-AC_CACHE_CHECK(which header file defines FD_ macros, s51_cv_fd,
-[sdcc_cv_fd="unknown"
-AC_EGREP_CPP(yes, [
-#include <sys/time.h>
-#ifdef FD_ZERO
-yes
-#endif], sdcc_cv_fd="<sys/time.h>")
-AC_EGREP_CPP(yes, [
-#include <sys/types.h>
-#ifdef FD_ZERO
-yes
-#endif], sdcc_cv_fd="<sys/types.h>")
-AC_EGREP_CPP(yes, [
-#include <sys/select.h>
-#ifdef FD_ZERO
-yes
-#endif], sdcc_cv_fd="<sys/types.h>")])
-
-AC_DEFINE(FD_HEADER_OK, 0)
-if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
-AC_DEFINE(FD_NEED_TIME_H, 1)
-AC_DEFINE(FD_HEADER_OK, 1)
-else
-AC_DEFINE(FD_NEED_TIME_H, 0)
-fi
-if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
-AC_DEFINE(FD_NEED_TYPES_H, 1)
-AC_DEFINE(FD_HEADER_OK, 1)
-else
-AC_DEFINE(FD_NEED_TYPES_H, 0)
-fi
-if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
-AC_DEFINE(FD_NEED_SELECT_H, 1)
-AC_DEFINE(FD_HEADER_OK, 1)
-else
-AC_DEFINE(FD_NEED_SELECT_H, 0)
-fi
-
-AC_DEFINE_UNQUOTED(HEADER_FD, ${sdcc_cv_fd})
 
 
 # Checking for functions
 # ===========================================================================
-AC_CHECK_FUNCS(strlen strcpy strcat strstr strcmp strerror strtok strdup)
-AC_CHECK_FUNCS(strchr memcpy vsnprintf snprintf vsprintf)
-AC_CHECK_FUNCS(mkstemp)
-dnl AC_CHECK_FUNCS(getline)
-dnl AC_CHECK_FUNCS(getdelim)
-AC_CHECK_FUNCS(fgets)
-AC_CHECK_FUNCS(yylex)
-
-# check if -lsocket && -lxnet is required to compile socket stuff
-AC_SEARCH_LIBS(socket,socket)
-AC_SEARCH_LIBS(inet_addr,nsl xnet)
+AC_CHECK_FUNCS(strerror)
+AC_CHECK_FUNCS(vsnprintf snprintf vsprintf mkstemp)
+
 
 # Macro definitions
-###################
+# ===========================================================================
 
 # DD_COPT macro checks if the compiler specified as the 1st parameter
 # supports option specified as the 2nd parameter
@@ -148,9 +102,30 @@ 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.
+#
+# Note that the 3 argument form is only supported with autoconf 2.13
+# and later (i.e. only where _AC_DEFINE supports 3 arguments).
+#
+# Examples:
+#
+#  AC_DEFINE_DIR(DATADIR, datadir)
+#  AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+
+AC_DEFUN([AC_DEFINE_DIR], [
+  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))
+])
+
 
 # Checking characteristics of compilers and other programs
-# --------------------------------------------------------
+# ===========================================================================
 AC_CACHE_CHECK(whether preprocessor accepts -MM or -M,sdcc_cv_MM,
 echo "#include <stdio.h>" >_test_.c
 echo "" >>_test_.c
@@ -175,27 +150,14 @@ if test "$sdcc_cv_CCpipe" = "yes"; then
   CFLAGS="$CFLAGS -pipe"
 fi
 
-
 # Checks for typedefs, structures, and compiler characteristics.
 # ===========================================================================
 AC_TYPE_SIGNAL
 
-if test "$cross_compiling" = "no"; then
 AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
-else
-    if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
-       ac_cv_sizeof_char=1
-       ac_cv_sizeof_short=2
-       ac_cv_sizeof_int=4 
-       ac_cv_sizeof_long=4
-    else
-       : # FIXME
-    fi
-#echo
-fi
 
 type_name()
 {
@@ -227,58 +189,104 @@ AC_MSG_RESULT($TYPE_WORD)
 AC_MSG_CHECKING(type name for dword)
 TYPE_DWORD=`type_name 4`
 AC_MSG_RESULT($TYPE_DWORD)
-AC_DEFINE_UNQUOTED(TYPE_BYTE, $TYPE_BYTE)
-AC_DEFINE_UNQUOTED(TYPE_WORD, $TYPE_WORD)
+AC_DEFINE_UNQUOTED(TYPE_BYTE,  $TYPE_BYTE)
+AC_DEFINE_UNQUOTED(TYPE_WORD,  $TYPE_WORD)
 AC_DEFINE_UNQUOTED(TYPE_DWORD, $TYPE_DWORD)
 
 AC_C_BIGENDIAN
 
-#
-#
-if test "${prefix}" = "NONE"; then
-    prefix="/usr/local"
-fi
-
-config_in=`pwd`
-sdcc_datadir=${datadir}/sdcc
-AC_SUBST(sdcc_datadir)
-
-# For some unknown reason, putting this assignment in a subshell
-# like this causes the rvalue to be fully substituted. We need this
-# for the defines below to generate the right thing. We keep this
-# separate from the substituted sdcc_datadir because we want the
-# latter for makefiles.
-if test "${datadir}" = "\${prefix}/share"; then
-    sdcc_datadir_tmp=${prefix}/share/sdcc
-else
-    sdcc_datadir_tmp=${datadir}/sdcc
+# Set standard installation paths
+# ===========================================================================
+case $host in
+    *mingw32*)
+       MINGW32_HOST="yes"
+       ;;
+    *)
+       MINGW32_HOST="no"
+       ;;
+esac
+
+AC_MSG_CHECKING(host mingw32)
+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
 fi
 
-if test "${includedir}" = "\${prefix}/include"; then
-   AC_DEFINE_UNQUOTED(STANDARD_INCLUDE_DIR, "${sdcc_datadir_tmp}/include")
-   AC_DEFINE_UNQUOTED(SDCC_INCLUDE_DIR, "${sdcc_datadir_tmp}/include")
-else 
-   AC_DEFINE_UNQUOTED(STANDARD_INCLUDE_DIR, "${includedir}")
-   AC_DEFINE_UNQUOTED(SDCC_INCLUDE_DIR, "${includedir}")
+# 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
 
-AC_DEFINE_UNQUOTED(SDCC_LIB_DIR, "${sdcc_datadir_tmp}/lib")
-AC_DEFINE_UNQUOTED(STD_LIB, "libsdcc")
-AC_DEFINE_UNQUOTED(STD_INT_LIB, "libint")
-AC_DEFINE_UNQUOTED(STD_LONG_LIB, "liblong")
-AC_DEFINE_UNQUOTED(STD_FP_LIB, "libfloat")
+# standard libs
+AC_DEFINE_UNQUOTED(STD_LIB,       "libsdcc")
+AC_DEFINE_UNQUOTED(STD_INT_LIB,   "libint")
+AC_DEFINE_UNQUOTED(STD_LONG_LIB,  "liblong")
+AC_DEFINE_UNQUOTED(STD_FP_LIB,    "libfloat")
 AC_DEFINE_UNQUOTED(STD_DS390_LIB, "libds390")
-AC_DEFINE_UNQUOTED(STD_xa51_LIB, "xa51")
+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}")
 
-AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
-AC_DEFINE_UNQUOTED(DATADIR, "${sdcc_datadir_tmp}")
-AC_DEFINE_UNQUOTED(SRCDIR, "${config_in}")
+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}
+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}")
+sdcc_include_name="SDCC_INCLUDE"
+AC_DEFINE_DIR(SDCC_INCLUDE_NAME, "${sdcc_include_name}")
+sdcc_lib_name="SDCC_LIB"
+AC_DEFINE_DIR(SDCC_LIB_NAME, "${sdcc_lib_name}")
 
 # Now handle the port selection
+# ===========================================================================
 rm -f ports.all ports.build
-AC_ARG_ENABLE(mcs51-port,[  --disable-mcs51-port    Excludes the Intel mcs51 port])
+AC_ARG_ENABLE(mcs51-port,
+            AC_HELP_STRING([--disable-mcs51-port],
+                           [Excludes the Intel mcs51 port]))
 echo mcs51 >>ports.all
 if test "$enable_mcs51_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 1)
@@ -287,7 +295,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 0)
 fi
 
-AC_ARG_ENABLE(gbz80-port,[  --disable-gbz80-port    Excludes the Gameboy gbz80 port])
+AC_ARG_ENABLE(gbz80-port,
+            AC_HELP_STRING([--disable-gbz80-port],
+                           [Excludes the Gameboy gbz80 port]))
 echo z80 >>ports.all
 if test "$enable_gbz80_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 1)
@@ -296,7 +306,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 0)
 fi
 
-AC_ARG_ENABLE(z80-port,[  --disable-z80-port      Excludes the z80 port])
+AC_ARG_ENABLE(z80-port,
+            AC_HELP_STRING([--disable-z80-port],
+                           [Excludes the z80 port]))
 echo z80 >>ports.all
 if test "$enable_z80_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 1)
@@ -305,7 +317,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 0)
 fi
 
-AC_ARG_ENABLE(avr-port,[  --disable-avr-port      Excludes the AVR port])
+AC_ARG_ENABLE(avr-port,
+            AC_HELP_STRING([--disable-avr-port],
+                           [Excludes the AVR port]))
 echo avr >>ports.all
 if test "$enable_avr_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 1)
@@ -314,7 +328,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 0)
 fi
 
-AC_ARG_ENABLE(ds390-port,[  --disable-ds390-port    Excludes the DS390 port])
+AC_ARG_ENABLE(ds390-port,
+            AC_HELP_STRING([--disable-ds390-port],
+                           [Excludes the DS390 port]))
 echo ds390 >>ports.all
 if test "$enable_ds390_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 1)
@@ -325,7 +341,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, 0)
 fi
 
-AC_ARG_ENABLE(pic-port,[  --disable-pic-port      Excludes the PIC port])
+AC_ARG_ENABLE(pic-port,
+            AC_HELP_STRING([--disable-pic-port],
+                           [Excludes the PIC port]))
 echo pic >>ports.all
 if test "$enable_pic_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 1)
@@ -334,7 +352,9 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 0)
 fi
 
-AC_ARG_ENABLE(xa51-port,[  --disable-xa51-port Excludes the XA51 port])
+AC_ARG_ENABLE(xa51-port,
+            AC_HELP_STRING([--disable-xa51-port],
+                           [Excludes the XA51 port]))
 echo xa51 >>ports.all
 if test "$enable_xa51_port" = "no"; then
     AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 1)
@@ -343,19 +363,27 @@ else
     AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 0)
 fi
 
-AC_ARG_ENABLE(ucsim,[  --disable-ucsim         Disables configuring and building of ucsim])
+AC_ARG_ENABLE(ucsim,
+              AC_HELP_STRING([--disable-ucsim],
+                             [Disables configuring and building of ucsim]))
 OPT_ENABLE_UCSIM=$enable_ucsim
 AC_SUBST(OPT_ENABLE_UCSIM)
 
-AC_ARG_ENABLE(device-lib-build,[  --disable-device-lib-build Disables automatically building device libraries])
+AC_ARG_ENABLE(device-lib-build,
+              AC_HELP_STRING([--disable-device-lib-build],
+                             [Disables automatically building device libraries]))
 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
 AC_SUBST(OPT_ENABLE_DEVICE_LIB_BUILD)
 
-AC_ARG_ENABLE(packihx,[  --disable-packihx       Disables building packihx])
+AC_ARG_ENABLE(packihx,
+              AC_HELP_STRING([--disable-packihx],
+                             [Disables building packihx]))
 OPT_ENABLE_PACKIHX=$enable_packihx
 AC_SUBST(OPT_ENABLE_PACKIHX)
 
-AC_ARG_ENABLE(libgc,[  --enable-libgc          Use the Bohem memory allocator.  Lower runtime footprint.])
+AC_ARG_ENABLE(libgc,
+              AC_HELP_STRING([--enable-libgc],
+                             [Use the Bohem memory allocator. Lower runtime footprint.]))
 if test "$enable_libgc" = "yes"; then
         AC_CHECK_LIB(gc, GC_malloc)
         OPT_ENABLE_LIBGC=1
@@ -375,16 +403,14 @@ mv ports ports.build
 AC_CONFIG_SUBDIRS(support/cpp2)
 AC_CONFIG_SUBDIRS(packihx)
 AC_CONFIG_SUBDIRS(sim/ucsim)
-# MLH: removed as the rules are already in Makefile.common
-#as/z80/Makefile
-#link/z80/Makefile
-AC_OUTPUT(main.mk:main_in.mk
+AC_CONFIG_FILES([main.mk:main_in.mk
 src/Makefile
 as/mcs51/Makefile
 device/include/Makefile
 device/lib/Makefile
 debugger/mcs51/Makefile
 Makefile.common:Makefile.common.in
-)
+])
+AC_OUTPUT
 
 # End of configure/configure.in
index dcb6f09293eec5c9a06fec02a0bdf4f9e2e01250..0cc6cff0a75a9e3f969dfbbd2110cce635122f1d 100644 (file)
@@ -10,7 +10,7 @@ all: $(MANUAL).html $(MANUAL).pdf $(MANUAL).txt \
 
 install:
        $(INSTALL) -d $(docdir)
-       cp -rf *.html *.txt z80 avr $(docdir)
+       cp -rf *.txt z80 avr $(docdir)
        $(shell if [ -f $(MANUAL).html ]; then cp -rf $(MANUAL).html $(docdir); fi)
        $(shell if [ -f $(TSS).html    ]; then cp -rf $(TSS).html    $(docdir); fi)
        $(shell if [ -f $(CDB).html    ]; then cp -rf $(CDB).html    $(docdir); fi)
index 42f38853ea9d21fa030d9beee2150fc32db4ea10..6700fd14f37629a4bfe34b68db0920f0b103764f 100644 (file)
 #undef SRCDIR
 
 #define PREFIX                "\\sdcc"
+#define DATADIR               "\\sdcc"
 
-//#define STANDARD_INCLUDE_DIR  "\\sdcc\\local\\share\\include"
+#define BIN_DIR_SUFFIX        "bin"
+#define SEARCH_SUFFIX         ""
+#define INCLUDE_DIR_SUFFIX    "include"
+#define LIB_DIR_SUFFIX        "lib"
+
+// Obsolete:
 #define SDCC_INCLUDE_DIR      "\\sdcc\\include"
 #define SDCC_LIB_DIR          "\\sdcc\\lib"
 
+/* environment variables */
+#define SDCC_DIR_NAME "SDCC_HOME"
+#define SDCC_INCLUDE_NAME "SDCC_INCLUDE"
+#define SDCC_LIB_NAME "SDCC_LIB"
+
+/* standard libraries */
 #define STD_LIB               "libsdcc"
 #define STD_INT_LIB           "libint"
 #define STD_LONG_LIB          "liblong"
 #define STD_FP_LIB            "libfloat"
 #define STD_DS390_LIB         "libds390"
+// #undef STD_XA51_LIB
 
 // #undef HAVE_SYS_SOCKET_H
-// #undef HAVE_SYS_ISA_DEFS_H
-// #undef HAVE_ENDIAN_H
 
 #undef HAVE_STRERROR
 #define HAVE_VSNPRINTF
@@ -39,6 +50,8 @@
 #undef HAVE_MKSTEMP
 #define pclose  _pclose
 
+#define RETSIGTYPE void
+
 #define TYPE_BYTE char
 #define TYPE_WORD short
 #define TYPE_DWORD int
@@ -46,6 +59,8 @@
 #define TYPE_UWORD unsigned TYPE_WORD
 #define TYPE_UDWORD unsigned TYPE_DWORD
 
+/* #undef WORDS_BIGENDIAN */
+
 #undef OPT_DISABLE_MCS51
 #undef OPT_DISABLE_GBZ80
 #undef OPT_DISABLE_Z80
index 2cbf330524d6830bf6bcece8b0b3c3a13c906458..e6c7bd70be3253683fa3e92ccba9c2b40b378a73 100644 (file)
 
 #undef PREFIX
 #undef DATADIR
-#undef SRCDIR
 
-#undef STANDARD_INCLUDE_DIR
+#undef BIN_DIR_SUFFIX
+#undef SEARCH_SUFFIX
+#undef INCLUDE_DIR_SUFFIX
+#undef LIB_DIR_SUFFIX
+
+// Obsolete:
 #undef SDCC_INCLUDE_DIR
 #undef SDCC_LIB_DIR
+
+/* environment variables */
+#undef SDCC_DIR_NAME
+#undef SDCC_INCLUDE_NAME
+#undef SDCC_LIB_NAME
+
+/* standard libraries */
 #undef STD_LIB
 #undef STD_INT_LIB
 #undef STD_LONG_LIB
 #undef STD_FP_LIB
 #undef STD_DS390_LIB
 #undef STD_XA51_LIB
+
 #undef HAVE_SYS_SOCKET_H
 
 #undef HAVE_STRERROR
@@ -31,6 +43,8 @@
 #undef HAVE_VSPRINTF
 #undef HAVE_MKSTEMP
 
+#undef RETSIGTYPE
+
 #undef TYPE_BYTE
 #undef TYPE_WORD
 #undef TYPE_DWORD