summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Foskey <waratah@openoffice.org>2002-10-04 12:31:37 +0000
committerKen Foskey <waratah@openoffice.org>2002-10-04 12:31:37 +0000
commitc52e65d4c790b252c7c03dcc34312e47dc95fcda (patch)
tree547257810159a2791753d8d99ce5b87fc53dbd9b
parentdmake: remove cygwin makefile temporarily and implement depcomp (diff)
downloadcore-c52e65d4c790b252c7c03dcc34312e47dc95fcda.tar.gz
core-c52e65d4c790b252c7c03dcc34312e47dc95fcda.zip
Dmake: Convert the configure to a better configure process without individual conf.h files for every platform
-rwxr-xr-xdmake/Makefile.in83
-rwxr-xr-xdmake/aclocal.m467
-rw-r--r--dmake/config.h.in13
-rwxr-xr-xdmake/configure153
-rwxr-xr-xdmake/configure.in8
-rw-r--r--dmake/extern.h40
-rw-r--r--dmake/function.c10
-rw-r--r--dmake/startup/Makefile.in1
-rw-r--r--dmake/startup/unix/Makefile.in1
-rw-r--r--dmake/startup/unix/linux/Makefile.in1
-rw-r--r--dmake/startup/unix/macosx/Makefile.in1
-rw-r--r--dmake/startup/unix/solaris/Makefile.in1
-rwxr-xr-xdmake/unix/Makefile.in3
13 files changed, 314 insertions, 68 deletions
diff --git a/dmake/Makefile.in b/dmake/Makefile.in
index c423f4e25504..08047e08b106 100755
--- a/dmake/Makefile.in
+++ b/dmake/Makefile.in
@@ -17,9 +17,9 @@
#
# $RCSfile: Makefile.in,v $
#
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#
-# last change: $Author: waratah $ $Date: 2002-10-03 12:29:43 $
+# last change: $Author: waratah $ $Date: 2002-10-04 13:31:33 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -158,7 +158,8 @@ CFLAGS = -O
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES = startup/unix/cygwin/Makefile dmakeroot.h
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = dmakeroot.h
bin_PROGRAMS = dmake$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
@@ -174,7 +175,7 @@ dmake_DEPENDENCIES = unix/libunix.a
dmake_LDFLAGS =
DEFS = @DEFS@
-DEFAULT_INCLUDES = -I. -I$(srcdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
@@ -199,14 +200,15 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in \
- NEWS acconfig.h acinclude.m4 aclocal.m4 config.guess config.sub \
- configure configure.in depcomp dmakeroot.h.in install-sh \
- missing mkinstalldirs
+DIST_COMMON = ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
+ Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 \
+ config.guess config.h.in config.sub configure configure.in \
+ depcomp dmakeroot.h.in install-sh missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
SOURCES = $(dmake_SOURCES)
-all: all-recursive
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .o .obj
@@ -225,8 +227,31 @@ $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-startup/unix/cygwin/Makefile: $(top_builddir)/config.status $(top_srcdir)/startup/unix/cygwin/Makefile.in
- cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h stamp-hT
+ @echo timestamp > stamp-hT 2> /dev/null
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @mv stamp-hT stamp-h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/./stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/./stamp-h.in; \
+ $(MAKE) $(srcdir)/./stamp-h.in; \
+ else :; fi
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+ @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+
+distclean-hdr:
+ -rm -f config.h
dmakeroot.h: $(top_builddir)/config.status dmakeroot.h.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
install-binPROGRAMS: $(bin_PROGRAMS)
@@ -366,7 +391,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
@@ -381,8 +406,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
@@ -403,7 +428,7 @@ GZIP_ENV = --best
distdir: $(DISTFILES)
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir)
- $(mkinstalldirs) $(distdir)/. $(distdir)/startup/unix/cygwin
+ $(mkinstalldirs) $(distdir)/.
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
@@ -474,7 +499,7 @@ distcheck: dist
sed 'h;s/./=/g;p;x;p;x'
check-am: all-am
check: check-recursive
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) config.h
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -512,7 +537,7 @@ dist-all: distdir
distclean: distclean-recursive
-rm -f config.status config.cache config.log
distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+ distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
@@ -547,18 +572,18 @@ uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic clean-recursive dist dist-all \
distcheck distclean distclean-compile distclean-depend \
- distclean-generic distclean-recursive distclean-tags distdir \
- dvi dvi-am dvi-recursive info info-am info-recursive install \
- install-am install-binPROGRAMS install-data install-data-am \
- install-data-recursive install-exec install-exec-am \
- install-exec-recursive install-info install-info-am \
- install-info-recursive install-man install-recursive \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am installdirs-recursive maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-recursive \
- tags tags-recursive uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am \
+ distclean-generic distclean-hdr distclean-recursive \
+ distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
+ info-recursive install install-am install-binPROGRAMS \
+ install-data install-data-am install-data-recursive \
+ install-exec install-exec-am install-exec-recursive \
+ install-info install-info-am install-info-recursive install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-recursive tags tags-recursive \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/dmake/aclocal.m4 b/dmake/aclocal.m4
index e15fbf32a326..4858eeda076a 100755
--- a/dmake/aclocal.m4
+++ b/dmake/aclocal.m4
@@ -525,3 +525,70 @@ AC_DEFUN([AM_MAINTAINER_MODE],
]
)
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+# serial 3
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. We must strip everything past the first ":",
+# and everything past the last "/".
+
+AC_PREREQ([2.12])
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[ifdef([AC_FOREACH],dnl
+ [dnl init our file count if it isn't already
+ m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
+ dnl prepare to store our destination file list for use in config.status
+ AC_FOREACH([_AM_File], [$1],
+ [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
+ m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
+ dnl and add it to the list of files AC keeps track of, along
+ dnl with our hook
+ AC_CONFIG_HEADERS(_AM_File,
+dnl COMMANDS, [, INIT-CMDS]
+[# update the timestamp
+echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
+][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
+ m4_popdef([_AM_Dest])])],dnl
+[AC_CONFIG_HEADER([$1])
+ AC_OUTPUT_COMMANDS(
+ ifelse(patsubst([$1], [[^ ]], []),
+ [],
+ [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
+ patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
+[am_indx=1
+for am_file in $1; do
+ case " \$CONFIG_HEADERS " in
+ *" \$am_file "*)
+ am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+ if test -n "\$am_dir"; then
+ am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+ for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+ am_tmpdir=\$am_tmpdir\$am_subdir/
+ if test ! -d \$am_tmpdir; then
+ mkdir \$am_tmpdir
+ fi
+ done
+ fi
+ echo timestamp > "\$am_dir"stamp-h\$am_indx
+ ;;
+ esac
+ am_indx=\`expr \$am_indx + 1\`
+done])
+])]) # AM_CONFIG_HEADER
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+ [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+ m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
+ m4_if(m4_regexp([$1], [^/.*]), -1,
+ [.],
+ m4_patsubst([$1], [^\(/\).*], [\1])),
+ m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+ m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+]) # _AM_DIRNAME
+
diff --git a/dmake/config.h.in b/dmake/config.h.in
index 608b283cc4cf..15824ba9cf8e 100644
--- a/dmake/config.h.in
+++ b/dmake/config.h.in
@@ -51,6 +51,9 @@
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -66,14 +69,14 @@
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/dmake/configure b/dmake/configure
index f109701f9150..d78be0316c10 100755
--- a/dmake/configure
+++ b/dmake/configure
@@ -457,7 +457,7 @@ echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=acconfig.h
+ac_unique_file=
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
@@ -1675,7 +1675,7 @@ EOF
fi
-for ac_hdr in fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h
+for ac_hdr in fcntl.h limits.h strings.h sys/types.h sys/stat.h unistd.h errno.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -2202,7 +2202,7 @@ case "$_os" in
OS_VERSION=linux
;;
"OSF1")
- OS_VERSION=tru64
+ OS_VERSION=sysvr4
;;
"NetBSD")
OS_VERSION=linux
@@ -2223,6 +2223,10 @@ echo "$ac_t""checked ($_os)" 1>&6
+
+
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -2286,19 +2290,7 @@ fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
+DEFS=-DHAVE_CONFIG_H
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
@@ -2338,7 +2330,7 @@ ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile unix/Makefile startup/Makefile startup/unix/Makefile \
startup/unix/linux/Makefile startup/unix/solaris/Makefile \
- startup/unix/macosx/Makefile dmakeroot.h " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ startup/unix/macosx/Makefile dmakeroot.h config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2505,10 +2497,136 @@ s%@INSTALL@%$INSTALL%g
fi; done
rm -f conftest.s*
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
EOF
cat >> $CONFIG_STATUS <<EOF
AMDEP_TRUE="$AMDEP_TRUE"
ac_aux_dir="$ac_aux_dir"
+am_indx=1
+for am_file in config.h; do
+ case " \$CONFIG_HEADERS " in
+ *" \$am_file "*)
+ am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+ if test -n "\$am_dir"; then
+ am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+ for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+ am_tmpdir=\$am_tmpdir\$am_subdir/
+ if test ! -d \$am_tmpdir; then
+ mkdir \$am_tmpdir
+ fi
+ done
+ fi
+ echo timestamp > "\$am_dir"stamp-h\$am_indx
+ ;;
+ esac
+ am_indx=\`expr \$am_indx + 1\`
+done
EOF
cat >> $CONFIG_STATUS <<\EOF
@@ -2551,6 +2669,7 @@ for mf in $CONFIG_FILES; do
done
done
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
exit 0
EOF
diff --git a/dmake/configure.in b/dmake/configure.in
index 182cf81dc543..48fc8d80ed7e 100755
--- a/dmake/configure.in
+++ b/dmake/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
-AC_INIT(acconfig.h)
+AC_INIT
dnl set the DMAKEROOT
#AC_FUNC_SET_DMAKEROOT
@@ -31,7 +31,7 @@ dnl Initialize libtool
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/types.h sys/stat.h unistd.h errno.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -72,7 +72,7 @@ case "$_os" in
OS_VERSION=linux
;;
"OSF1")
- OS_VERSION=tru64
+ OS_VERSION=sysvr4
;;
"NetBSD")
OS_VERSION=linux
@@ -93,6 +93,8 @@ AC_MSG_RESULT([checked ($_os)])
AC_SUBST(OS_VERSION)
+AM_CONFIG_HEADER(config.h)
+
AC_OUTPUT(Makefile unix/Makefile startup/Makefile startup/unix/Makefile \
startup/unix/linux/Makefile startup/unix/solaris/Makefile \
startup/unix/macosx/Makefile dmakeroot.h )
diff --git a/dmake/extern.h b/dmake/extern.h
index 07060e65d5d2..0b0a535ada64 100644
--- a/dmake/extern.h
+++ b/dmake/extern.h
@@ -1,4 +1,4 @@
-/* RCS $Id: extern.h,v 1.3 2002-07-11 08:53:29 mh Exp $
+/* RCS $Id: extern.h,v 1.4 2002-10-04 13:31:34 waratah Exp $
--
-- SYNOPSIS
-- External declarations for dmake functions.
@@ -27,25 +27,50 @@
#ifndef EXTERN_h
#define EXTERN_h
+#include "config.h"
+
/* Define this for the RS/6000 if it breaks something then we have to put a
* #ifdef around it. */
#if defined(rs6000)
#define _POSIX_SOURCE
#endif
-#include <limits.h>
#include <stdio.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <string.h>
#include <ctype.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#if defined (_MPW)
-# include <types.h>
-# include <time.h>
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#if HAVE_SYS_TYPES_H
# include <sys/types.h>
+#else
+# include <types.h>
+#endif
+#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
+
+#define PVOID void *
+
#include <signal.h>
#include "itypes.h"
#include "stdmacs.h"
@@ -60,7 +85,6 @@
/* Include this last as it invalidates some functions that are defined
* externally above and turns them into no-ops. Have to do this after
* the extern declarations however. */
-#include "conf.h"
#include "posix.h"
#endif
diff --git a/dmake/function.c b/dmake/function.c
index d3bcffbb25b9..20e83b7f9695 100644
--- a/dmake/function.c
+++ b/dmake/function.c
@@ -1,4 +1,4 @@
-/* RCS $Id: function.c,v 1.1.1.1 2000-09-22 15:33:25 hr Exp $
+/* RCS $Id: function.c,v 1.2 2002-10-04 13:31:34 waratah Exp $
--
-- SYNOPSIS
-- GNU style functions for dmake.
@@ -39,7 +39,7 @@ static char *_exec_assign ANSI((char *));
static char *_exec_foreach ANSI((char *, char *, char *));
static char *_exec_andor ANSI((char *, int));
static char *_exec_not ANSI((char *));
-static int _mystrcmp ANSI((CONST PVOID, CONST PVOID));
+static int _mystrcmp ANSI((const PVOID, const PVOID));
PUBLIC char *
@@ -433,10 +433,10 @@ char *args;
static int
_mystrcmp( p, q )
-CONST PVOID p;
-CONST PVOID q;
+const PVOID p;
+const PVOID q;
{
- return(strcmp(*((CONST char **)p),*((CONST char **)q)));
+ return(strcmp(*((const char **)p),*((const char **)q)));
}
diff --git a/dmake/startup/Makefile.in b/dmake/startup/Makefile.in
index f8ed1ed26140..60b5ca101152 100644
--- a/dmake/startup/Makefile.in
+++ b/dmake/startup/Makefile.in
@@ -81,6 +81,7 @@ startup_DATA = startup.mk template.mk
SUBDIRS = unix
subdir = startup
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(startup_DATA)
diff --git a/dmake/startup/unix/Makefile.in b/dmake/startup/unix/Makefile.in
index fd632b1d0e28..947de801ad83 100644
--- a/dmake/startup/unix/Makefile.in
+++ b/dmake/startup/unix/Makefile.in
@@ -81,6 +81,7 @@ startup_DATA = macros.mk recipes.mk
SUBDIRS = @OS_VERSION@
subdir = startup/unix
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(startup_DATA)
diff --git a/dmake/startup/unix/linux/Makefile.in b/dmake/startup/unix/linux/Makefile.in
index 3ab9d7ba8aa2..d4fbb9c731ee 100644
--- a/dmake/startup/unix/linux/Makefile.in
+++ b/dmake/startup/unix/linux/Makefile.in
@@ -78,6 +78,7 @@ startupdir = $(datadir)/startup/unix/linux
startup_DATA = macros.mk
subdir = startup/unix/linux
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(startup_DATA)
diff --git a/dmake/startup/unix/macosx/Makefile.in b/dmake/startup/unix/macosx/Makefile.in
index 0385b6734a51..b6c1ae31d3ad 100644
--- a/dmake/startup/unix/macosx/Makefile.in
+++ b/dmake/startup/unix/macosx/Makefile.in
@@ -78,6 +78,7 @@ startupdir = $(datadir)/startup/unix/macosx
startup_DATA = macros.mk
subdir = startup/unix/macosx
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(startup_DATA)
diff --git a/dmake/startup/unix/solaris/Makefile.in b/dmake/startup/unix/solaris/Makefile.in
index d0f3215445a0..ef83977e7dc1 100644
--- a/dmake/startup/unix/solaris/Makefile.in
+++ b/dmake/startup/unix/solaris/Makefile.in
@@ -78,6 +78,7 @@ startupdir = $(datadir)/startup/unix/solaris
startup_DATA = macros.mk
subdir = startup/unix/solaris
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(startup_DATA)
diff --git a/dmake/unix/Makefile.in b/dmake/unix/Makefile.in
index 3f1ed285f6d9..1b9fb775f6c1 100755
--- a/dmake/unix/Makefile.in
+++ b/dmake/unix/Makefile.in
@@ -82,6 +82,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/unix/@OS_VERSION@/g
CFLAGS = -O
subdir = unix
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
@@ -93,7 +94,7 @@ am_libunix_a_OBJECTS = arlib.$(OBJEXT) dcache.$(OBJEXT) dirbrk.$(OBJEXT) \
libunix_a_OBJECTS = $(am_libunix_a_OBJECTS)
DEFS = @DEFS@
-DEFAULT_INCLUDES = -I. -I$(srcdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@