From c6f4a84be122d4ccb43897c0d6341f8f6465db99 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sun, 27 Jan 2002 01:54:02 +0100 Subject: [PATCH] Various fixes to the source, depend and export targets: All automatically generated files in the src tree (except some things in post_modules) are really generated now. When --disable-binary is used, most configure tests will fake success, so that make depend isn't short-circuited in modules that can't be compiled on this machine. Also a little less noise in the depend targets so that errors are easier to spot. Rev: Makefile:1.51 Rev: bin/nobinary_dummy:1.1 Rev: src/Makefile.in:1.282 Rev: src/aclocal.m4:1.35 Rev: src/configure.in:1.563 Rev: src/make_variables.in:1.5 Rev: src/modules/Gmp/Makefile.in:1.22 Rev: src/modules/Gmp/configure.in:1.29 Rev: src/modules/Java/configure.in:1.28 Rev: src/modules/Oracle/configure.in:1.33 Rev: src/modules/Perl/configure.in:1.12 Rev: src/modules/_Crypto/lib/configure.in:1.13 Rev: src/modules/_Image_FreeType/configure.in:1.8 Rev: src/modules/_Image_XFace/configure.in:1.10 Rev: src/modules/dynamic_module_makefile.in:1.79 Rev: src/modules/files/configure.in:1.79 Rev: src/modules/static_module_makefile.in:1.70 Rev: src/post_modules/GTK/configure.in:1.35 Rev: src/post_modules/Unicode/Makefile.in:1.4 --- Makefile | 25 +++-- bin/nobinary_dummy | 42 +++++++ src/Makefile.in | 22 ++-- src/aclocal.m4 | 99 +++++++++++++--- src/configure.in | 137 ++++++++++++++--------- src/make_variables.in | 12 +- src/modules/Gmp/Makefile.in | 5 +- src/modules/Gmp/configure.in | 13 +-- src/modules/Java/configure.in | 2 +- src/modules/Oracle/configure.in | 14 ++- src/modules/Perl/configure.in | 6 +- src/modules/_Crypto/lib/configure.in | 12 +- src/modules/_Image_FreeType/configure.in | 2 +- src/modules/_Image_XFace/configure.in | 7 +- src/modules/dynamic_module_makefile.in | 11 +- src/modules/files/configure.in | 9 +- src/modules/static_module_makefile.in | 16 ++- src/post_modules/GTK/configure.in | 10 +- src/post_modules/Unicode/Makefile.in | 8 +- 19 files changed, 311 insertions(+), 141 deletions(-) create mode 100755 bin/nobinary_dummy diff --git a/Makefile b/Makefile index be3c99eb48..aee859d2fc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.50 2002/01/16 05:27:12 nilsson Exp $ +# $Id: Makefile,v 1.51 2002/01/27 00:53:58 mast Exp $ # # Meta Makefile # @@ -75,9 +75,14 @@ configure: src/configure builddir echo "$$configureargs" > .configureargs; \ if test "x$$oldconfigureargs" = "x$$configureargs"; then :; \ else \ - echo Configure arguments have changed - doing make clean and depend; \ + echo Configure arguments have changed - doing make clean; \ $(MAKE) "MAKE=$(MAKE)" clean || exit $$?; \ - $(MAKE) "MAKE=$(MAKE)" depend || exit $$?; \ + if test "x$(METATARGET)" = "xsource"; then :; \ + elif test "x$(METATARGET)" = "xexport"; then :; \ + else \ + echo Configure arguments have changed - doing make depend; \ + $(MAKE) "MAKE=$(MAKE)" depend || exit $$?; \ + fi; \ fi; \ fi; \ } || exit $$? @@ -107,6 +112,8 @@ compile: configure done; \ } || exit $$? +# FIXME: The refdoc stuff ought to use $(BUILDDIR) too. + documentation: @test -f "$(BUILDDIR)/pike" || $(MAKE) $(MAKE_FLAGS) compile @cd "$(BUILDDIR)" && $(MAKE) $(MAKE_FLAGS) documentation @@ -155,12 +162,12 @@ run_hilfe: @$(MAKE) $(MAKE_FLAGS) "METATARGET=run_hilfe" source: - @$(MAKE) "MAKE=$(MAKE)" "CONFIGUREARGS=--disable-binary" "OS=source" \ - "RUNPIKE=$(RUNPIKE)" "LIMITED_TARGETS=yes" "METATARGET=source" compile + @$(MAKE) "MAKE=$(MAKE)" "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \ + "OS=source" "LIMITED_TARGETS=yes" "METATARGET=source" compile export: - @$(MAKE) "MAKE=$(MAKE)" "CONFIGUREARGS=--disable-binary" "OS=source" \ - "RUNPIKE=$(RUNPIKE)" "LIMITED_TARGETS=yes" "METATARGET=export" compile + @$(MAKE) "MAKE=$(MAKE)" "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \ + "OS=source" "LIMITED_TARGETS=yes" "METATARGET=export" compile bin_export: @$(MAKE) $(MAKE_FLAGS) "METATARGET=bin_export" @@ -216,13 +223,15 @@ distclean: delete_builddir $(MAKE) "OS=source" delete_builddir -rm -rf bin/pike -cvsclean: distclean +srcclean: for d in `find src -type d -print`; do \ if test -f "$$d/.cvsignore"; then \ (cd "$$d" && rm -f `cat ".cvsignore"`); \ else :; fi; \ done +cvsclean: srcclean distclean + depend: configure -@cd "$(BUILDDIR)" && \ $(MAKE) "MAKE=$(MAKE)" "MAKE_PARALLEL=$(MAKE_PARALLEL)" depend || { \ diff --git a/bin/nobinary_dummy b/bin/nobinary_dummy new file mode 100755 index 0000000000..7991ea1960 --- /dev/null +++ b/bin/nobinary_dummy @@ -0,0 +1,42 @@ +#!/bin/sh +# This takes the place of the preprocessor, compiler and linker when +# --disable-binary is used. It's designed to fake success for all +# configure tests, so that e.g. make depend will go through all +# modules properly. +# +# Created 2002-01-26 by Martin Stjernholm + +# First argument might be "cc", "cpp" or similar to say what should be +# faked. If it's something else, the script has taken the place of +# something returned by AC_CHECK_PROG. + +case "$1" in + cc) + shift + + for option + do + case "$1" in + -o) + shift + prog="$1" + ;; + -o*) + prog=`echo $1 | sed -e's/^-o//'` + ;; + esac + done + + test x"$prog" = x || { + rm -f "$prog" 2>/dev/null + ln -s /bin/true "$prog" + } + ;; + + *) + # A space causes the output to have some length, but not any + # characters that can confuse things if it's e.g. inserted in a + # program argument list. + echo " " + ;; +esac diff --git a/src/Makefile.in b/src/Makefile.in index d00893c596..72bb846eb0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.281 2001/12/09 01:13:14 mast Exp $ +# $Id: Makefile.in,v 1.282 2002/01/27 00:53:58 mast Exp $ # # This line is needed on some machines. @@ -95,9 +95,9 @@ LD=@LD@ LDFLAGS=@LDFLAGS@ @LINKFORSHARED@ $(EXTRALDFLAGS) DEFAULT_RUNPIKE=$(TMP_BUILDDIR)/pike -DNOT_INSTALLED -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) -RUNPIKE=$(DEFAULT_RUNPIKE) USE_TPIKE=$(TMP_BUILDDIR)/precompile.sh -USE_PIKE=@PIKE@ $(PIKEOPTS) +USE_PIKE=pike $(PIKEOPTS) +RUNPIKE=$(@RUNPIKE@) RUNTPIKE=$(@RUNTPIKE@) PIKE_MODULE_RELOC=@PIKE_MODULE_RELOC@ @@ -163,10 +163,14 @@ MODULE_REQUIREMENTS= \ $(SRCDIR)/interpret_protos.h \ lib @EXTRA_MODULE_REQUIREMENTS@ - -DEPEND= \ +SRC_TARGETS= \ + $(SRCDIR)/peep_engine.c \ + $(SRCDIR)/case_info.h \ + $(SRCDIR)/treeopt.h \ $(SRCDIR)/language.c \ - $(SRCDIR)/builtin.c + $(SRCDIR)/language.h \ + $(SRCDIR)/interpret_protos.h \ + @PMOD_TARGETS@ # # The following objectfiles differ between tpike & pike: @@ -345,7 +349,7 @@ hilfe: $(TMP_BINDIR)/hilfe Makefile # The .c file will not be created in the SOURCE directory otherwise. # -Hubbe # -.cmod.c: precompile.sh-stamp +.cmod.c: precompile.sh-stamp precompile.pike ./precompile.sh precompile.pike >"$@" "$<" || { rm "$@"; exit 1; } # This rule is used for some header files that are generated from the @@ -555,7 +559,7 @@ aclocal: $(SRCDIR)/aclocal.m4 # We touch the files that depend on language.h_src and # interpret_protos.h_src to ensure that the .h_src.h rule doesn't have # anything to do in the dist. -source: $(SRCDIR)/peep_engine.c $(SRCDIR)/case_info.h $(SRCDIR)/treeopt.h $(SRCDIR)/language.c $(SRCDIR)/language.h $(SRCDIR)/interpret_protos.h depend +source: depend touch $(SRCDIR)/language.c $(SRCDIR)/language.h $(SRCDIR)/interpret_protos.h # make export archive (requires compiled Pike) @@ -643,7 +647,7 @@ stamp-tpike-predep: $(SRCDIR)/peep.in $(TMP_BINDIR)/mkpeep.pike peep.c $(SRCDIR) @echo foo > stamp-tpike-predep # make dependencies -depend: $(DEPEND) +depend: $(SRC_TARGETS) gcc -MM -MG $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh $(SRCDIR) -@(while :; do \ echo foo > cfl.$@; test "`echo cfl.*`" = cfl.$@ && break; \ diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 2d44ba39f6..529f8eee15 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.34 2001/10/06 20:32:57 grubba Exp $ +dnl $Id: aclocal.m4,v 1.35 2002/01/27 00:53:59 mast Exp $ dnl Some compatibility with Autoconf 2.50+. Not complete. dnl newer autoconf call substr m4_substr @@ -117,7 +117,9 @@ EOF ]) AC_MSG_RESULT($AC_CV_NAME) undefine([AC_CV_NAME])dnl - else :; fi + elif test "x$enable_binary" = "xno"; then + translit(ac_cv_sizeof_$1, [ *], [_p])=$2 + fi ORIG_AC_CHECK_SIZEOF($1,$2) ]) @@ -227,7 +229,7 @@ define(PIKE_FEATURE_OK,[ define([AC_LOW_MODULE_INIT], [ -# $Id: aclocal.m4,v 1.34 2001/10/06 20:32:57 grubba Exp $ +# $Id: aclocal.m4,v 1.35 2002/01/27 00:53:59 mast Exp $ MY_AC_PROG_CC @@ -257,6 +259,36 @@ AC_ARG_WITH(root, [ --with-root=path specify a cross-compilation root-di ;; esac ],[with_root=""]) + +if test "x$enable_binary" = "xno"; then + # Fix makefile rules as if we're cross compiling, to use pike + # fallbacks etc. Do this without setting $ac_cv_prog_cc_cross to yes + # since autoconf macros like AC_TRY_RUN will complain bitterly then. + CROSS=yes +else + CROSS="$ac_cv_prog_cc_cross" + # newer autoconf + if test x"$CROSS" = x; then + CROSS="$cross_compiling" + fi +fi + +AC_SUBST(CROSS) + +if test "x$enable_binary" = "xno"; then + CC="$BINDIR/nobinary_dummy cc" + CPP="$BINDIR/nobinary_dummy cpp" + RUNPIKE="USE_PIKE" + RUNTPIKE="USE_PIKE" +elif test "x$ac_cv_prog_cc_cross" = "xyes"; then + RUNPIKE="DEFAULT_RUNPIKE" + RUNTPIKE="USE_PIKE" +else + RUNPIKE="DEFAULT_RUNPIKE" + RUNTPIKE="USE_TPIKE" +fi +AC_SUBST(RUNPIKE) +AC_SUBST(RUNTPIKE) ]) @@ -272,12 +304,10 @@ static_module_makefile=PIKE_INCLUDE_PATH/dynamic_module_makefile ],[ AC_MSG_CHECKING([for the Pike module base directory]) - dynamic_module_makefile=../dynamic_module_makefile - static_module_makefile=../static_module_makefile - counter=. - while test ! -f "$dynamic_module_makefile" + uplevels=../ + while test ! -f "${uplevels}dynamic_module_makefile" do counter=.$counter if test $counter = .......... ; then @@ -286,10 +316,12 @@ static_module_makefile=PIKE_INCLUDE_PATH/dynamic_module_makefile else : fi - dynamic_module_makefile=../$dynamic_module_makefile - static_module_makefile=../$static_module_makefile + uplevels=../$uplevels done - AC_MSG_RESULT(found) + + dynamic_module_makefile=${uplevels}dynamic_module_makefile + static_module_makefile=${uplevels}static_module_makefile + AC_MSG_RESULT(${uplevels}.) ]) ]) @@ -326,6 +358,13 @@ pushdef([AC_OUTPUT], export CCSHARED AC_SUBST(CCSHARED) + PMOD_TARGETS= + for f in $srcdir/*.cmod; do + PMOD_TARGETS="$PMOD_TARGETS $f" + done + PMOD_TARGETS=`echo $srcdir/*.cmod | sed -e "s/\.cmod/\.c/g" | sed -e "s|$srcdir/|\\$(SRCDIR)/|g"` + AC_SUBST(PMOD_TARGETS) + ifdef([PIKE_INCLUDE_PATH], [ make_variables_in=PIKE_INCLUDE_PATH/make_variables_in @@ -336,7 +375,8 @@ ifdef([PIKE_INCLUDE_PATH], counter=. - while test ! -f "$srcdir/$make_variables_in" + uplevels= + while test ! -f "$srcdir/$uplevels$make_variables_in" do counter=.$counter if test $counter = .......... ; then @@ -345,10 +385,11 @@ ifdef([PIKE_INCLUDE_PATH], else : fi - make_variables_in=../$make_variables_in + uplevels=../$uplevels done - AC_MSG_RESULT(found) + make_variables_in=$uplevels$make_variables_in + AC_MSG_RESULT(${uplevels}.) ]) AC_SUBST_FILE(make_variables) @@ -380,3 +421,35 @@ return 0; AC_DEFINE(translit(HAVE_$1,[a-z],[A-Z])) else :; fi ]) + +dnl These are like AC_PATH_PROG etc, but gives a path to +dnl nobinary_dummy when --disable-binary is used. That program will +dnl always return true and have ' ' as output. +define(MY_AC_CHECK_PROG,[ + if test "x$enable_binary" = "xno"; then + AC_CHECK_PROG($1,nobinary_dummy,$3,$4,$BINDIR) + else + AC_CHECK_PROG($1,$2,$3,$4,$5,$6) + fi +]) +define(MY_AC_CHECK_PROGS,[ + if test "x$enable_binary" = "xno"; then + AC_CHECK_PROGS($1,nobinary_dummy,$3,$BINDIR) + else + AC_CHECK_PROGS($1,$2,$3,$4) + fi +]) +define(MY_AC_PATH_PROG,[ + if test "x$enable_binary" = "xno"; then + AC_PATH_PROG($1,nobinary_dummy,$3,$BINDIR) + else + AC_PATH_PROG($1,$2,$3,$4) + fi +]) +define(MY_AC_PATH_PROGS,[ + if test "x$enable_binary" = "xno"; then + AC_PATH_PROGS($1,nobinary_dummy,$3,$BINDIR) + else + AC_PATH_PROGS($1,$2,$3,$4) + fi +]) diff --git a/src/configure.in b/src/configure.in index f195775693..3b995a86af 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1,4 +1,4 @@ -AC_REVISION("$Id: configure.in,v 1.562 2001/12/10 02:08:13 mast Exp $") +AC_REVISION("$Id: configure.in,v 1.563 2002/01/27 00:53:59 mast Exp $") AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h) @@ -77,10 +77,13 @@ AC_ARG_ENABLE(binary, MY_DESCR([--disable-binary], [], [enable_binary=yes]) if test "x$enable_binary" = "xno"; then - AC_MSG_WARN(Short-circuiting configure tests for binary building.) - AC_MSG_WARN(Only some targets in the Makefile can be used.) - CC=false - CPP=echo + AC_MSG_WARN([ + +Short-circuiting configure tests for binary building. Only some +targets in the Makefile can be used, typically those that only +operates on the source directory, e.g. depend. + +]) else if test ! -z "$pike_cv_prog_CC_save" -a ! -z "$CC" -a "$CC" != "$pike_cv_prog_CC_save" @@ -91,17 +94,23 @@ else pike_cv_prog_CC_save="$CC" - # MY_AC_PROG_CC - # The above has problems if the smartlink binary is removed. /grubba - AC_PROG_CC - AC_PROG_CPP +fi + +# Do the below even when --disable-binary is used, since we need a +# real $CPP, and AC_PROG_CPP wants AC_PROG_CC to be called earlier. +# $CC will be overridden with a dummy later on. + +# MY_AC_PROG_CC +# The above has problems if the smartlink binary is removed. /grubba +AC_PROG_CC +AC_PROG_CPP ############################################################################# +if test "x$enable_binary" != "xno"; then AC_ISC_POSIX AC_AIX AC_MINIX - fi ############################################################################# @@ -282,33 +291,40 @@ fi ############################################################################# +LIBDIR=`(cd $srcdir/../lib ; pwd)` +BINDIR=`(cd $srcdir/../bin ; pwd)` +BUILDDIR=`pwd` +AC_SUBST(LIBDIR) +AC_SUBST(BINDIR) +AC_SUBST(BUILDDIR) + +############################################################################# + # -# Some cross-compilation support +# Some cross-compilation support and --disable-binary stuff # -CROSS="$ac_cv_prog_cc_cross" +if test "x$enable_binary" = "xno"; then + CROSS=yes +else + CROSS="$ac_cv_prog_cc_cross" +fi AC_SUBST(CROSS) -if test "x$ac_cv_prog_cc_cross" = "xyes"; then +if test "x$enable_binary" = "xno"; then + CC="$BINDIR/nobinary_dummy cc" + RUNPIKE="USE_PIKE" + RUNTPIKE="USE_PIKE" +elif test "x$ac_cv_prog_cc_cross" = "xyes"; then + RUNPIKE="DEFAULT_RUNPIKE" RUNTPIKE="USE_PIKE" else + RUNPIKE="DEFAULT_RUNPIKE" RUNTPIKE="USE_TPIKE" fi +AC_SUBST(RUNPIKE) AC_SUBST(RUNTPIKE) -AC_PATH_PROG(pike_prog,pike,no) -PIKE="$ac_cv_path_pike_prog" -AC_SUBST(PIKE) - -############################################################################# - -LIBDIR=`(cd $srcdir/../lib ; pwd)` -BINDIR=`(cd $srcdir/../bin ; pwd)` -BUILDDIR=`pwd` -AC_SUBST(LIBDIR) -AC_SUBST(BINDIR) -AC_SUBST(BUILDDIR) - ############################################################################# if test "x$enable_binary" != "xno"; then # The following tests are only relevant if we intend to build binaries. @@ -1752,23 +1768,19 @@ fi AC_DEFINE(POSIX_SOURCE) -if test "x$enable_binary" != "xno"; then - - AC_MSG_CHECKING(ansi prototype capability) - AC_CACHE_VAL(pike_cv_sys_ansi_prototypes, - [ - AC_TRY_COMPILE([int foo(int bar);],[], - [pike_cv_sys_ansi_prototypes=yes], - [pike_cv_sys_ansi_prototypes=no]) - ]) - - if test "$pike_cv_sys_ansi_prototypes" = "yes"; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no, giving up...) - exit 1 - fi +AC_MSG_CHECKING(ansi prototype capability) +AC_CACHE_VAL(pike_cv_sys_ansi_prototypes, +[ + AC_TRY_COMPILE([int foo(int bar);],[], + [pike_cv_sys_ansi_prototypes=yes], + [pike_cv_sys_ansi_prototypes=no]) +]) +if test "$pike_cv_sys_ansi_prototypes" = "yes"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no, giving up...) + exit 1 fi ############################################################################# @@ -3276,6 +3288,9 @@ fi AC_MSG_CHECKING(byteorder) AC_CACHE_VAL(pike_cv_hardware_byteorder, [ +if test "x$enable_binary" = "xno"; then + pike_cv_hardware_byteorder=0 +else AC_TRY_RUN([ #include <stdio.h> @@ -3308,7 +3323,9 @@ pike_cv_hardware_byteorder=`cat conftest.out.2` pike_cv_hardware_byteorder=0 , pike_cv_hardware_byteorder=0 -)]) +) +fi +]) AC_MSG_RESULT($pike_cv_hardware_byteorder) AC_DEFINE_UNQUOTED(PIKE_BYTEORDER,$pike_cv_hardware_byteorder) @@ -3318,6 +3335,9 @@ AC_DEFINE_UNQUOTED(PIKE_BYTEORDER,$pike_cv_hardware_byteorder) AC_MSG_CHECKING(INT32 alignment) AC_CACHE_VAL(pike_cv_hardware_alignment, [ +if test "x$enable_binary" = "xno"; then + pike_cv_hardware_alignment=4 +else AC_TRY_RUN([ #include <stdio.h> @@ -3346,7 +3366,9 @@ int main(int argc, char *argv[]) pike_cv_hardware_alignment=`cat conftest.out.2`, pike_cv_hardware_alignment=4, pike_cv_hardware_alignment=4 -)]) +) +fi +]) AC_MSG_RESULT($pike_cv_hardware_alignment) AC_DEFINE_UNQUOTED(PIKE_INT32_ALIGNMENT,$pike_cv_hardware_alignment) @@ -4281,6 +4303,9 @@ fi AC_MSG_CHECKING(available file descriptors) AC_CACHE_VAL(pike_cv_max_open_fd, [ +if test "x$enable_binary" = "xno"; then + pike_cv_max_open_fd=256 +else AC_TRY_RUN([ #include <stdio.h> #ifdef HAVE_SYS_TIME_H @@ -4334,7 +4359,9 @@ pike_cv_max_open_fd=`cat conftest.out.2` pike_cv_max_open_fd=256 , pike_cv_max_open_fd=256 -)]) +) +fi +]) AC_MSG_RESULT($pike_cv_max_open_fd) AC_DEFINE_UNQUOTED(MAX_OPEN_FILEDESCRIPTORS,$pike_cv_max_open_fd) @@ -4705,6 +4732,9 @@ rm -f core ########################################################################## AC_MSG_CHECKING(how well OOB handling works) AC_CACHE_VAL(pike_cv_system_oob_working,[ +if test "x$enable_binary" = "xno"; then + pike_cv_system_oob_working=WORKING +else OCPPFLAGS="$CPPFLAGS" CPPFLAGS="-I. -I../.. -I$srcdir -I$srcdir/../.." AC_TRY_RUN([ @@ -5030,6 +5060,7 @@ pike_cv_system_oob_working=UNKNOWN) CPPFLAGS="$OCPPFLAGS" rm conftest.out.2 >/dev/null 2>/dev/null || : +fi ]) AC_MSG_RESULT($pike_cv_system_oob_working) @@ -5749,8 +5780,6 @@ dnl fi fi -############################################################################# -if test "x$enable_binary" != "xno"; then ############################################################################# if test x$with_dynamic_modules = xyes ; then @@ -5762,10 +5791,20 @@ fi ############################################################################# +PMOD_TARGETS= +for f in $srcdir/*.cmod; do + PMOD_TARGETS="$PMOD_TARGETS $f" +done +PMOD_TARGETS=`echo $srcdir/*.cmod | sed -e "s/\.cmod/\.c/g" | sed -e "s|$srcdir/|\\$(SRCDIR)/|g"` +AC_SUBST(PMOD_TARGETS) + +############################################################################# + echo echo "Compiler summary:" echo echo "C Compiler: $CC" +echo "Preprocessor: $CPP" echo "Linker: $LD" echo "Shared linker: $LDSHARED" echo @@ -5804,10 +5843,6 @@ AC_SUBST(EXTRA_MODULE_REQUIREMENTS) pike_cv_prog_CC="${CC}" -############################################################################# -else #if test "x$enable_binary" != "xno" - dmmsrc="modules/static_module_makefile.in" -fi ############################################################################# AC_CONFIG_SUBDIRS(modules post_modules) diff --git a/src/make_variables.in b/src/make_variables.in index 6909fe4eb7..bbf2848757 100644 --- a/src/make_variables.in +++ b/src/make_variables.in @@ -1,6 +1,6 @@ # -*- Makefile -*- # -# $Id: make_variables.in,v 1.4 1999/12/11 16:21:47 mast Exp $ +# $Id: make_variables.in,v 1.5 2002/01/27 00:53:59 mast Exp $ # @SET_MAKE@ @@ -11,8 +11,13 @@ TMP_BUILDDIR=@BUILDDIR@ TMP_BINDIR=@BINDIR@ DEFINES=@CPPFLAGS@ TMP_LIBDIR=$(TMP_BUILDDIR)/lib -RUNPIKE=$(TMP_BUILDDIR)/pike -DNOT_INSTALLED -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) -RUNTPIKE=$(TMP_BUILDDIR)/tpike -DNOT_INSTALLED -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) + +DEFAULT_RUNPIKE=$(TMP_BUILDDIR)/pike -DNOT_INSTALLED -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) +USE_TPIKE=$(TMP_BUILDDIR)/precompile.sh +USE_PIKE=pike $(PIKEOPTS) +RUNPIKE=$(@RUNPIKE@) +RUNTPIKE=$(@RUNTPIKE@) + OPTIMIZE=@OPTIMIZE@ INSTALL=@INSTALL@ WARN=@WARN@ @@ -20,3 +25,4 @@ OTHERFLAGS=@CFLAGS@ $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL) NOOPTFLAGS=@CFLAGS@ @CPPFLAGS@ $(OSFLAGS) $(WARN) $(PROFIL) AR=@AR@ SRCDIR=@srcdir@ +PMOD_TARGETS=@PMOD_TARGETS@ diff --git a/src/modules/Gmp/Makefile.in b/src/modules/Gmp/Makefile.in index 6958dc1fbd..6f920f07e3 100644 --- a/src/modules/Gmp/Makefile.in +++ b/src/modules/Gmp/Makefile.in @@ -1,8 +1,9 @@ -# $Id: Makefile.in,v 1.21 2001/09/06 20:37:28 grubba Exp $ +# $Id: Makefile.in,v 1.22 2002/01/27 00:54:00 mast Exp $ @make_variables@ VPATH=@srcdir@:@srcdir@/../..:../.. MODULE_LDFLAGS=@LDFLAGS@ @LIBS@ OBJS=mpz_glue.o next_prime.o my_mpz_xor.o mpq.o mpf.o +SRC_TARGETS=prime_table.out PRIME_LIMIT=1024 @@ -29,6 +30,4 @@ prime_table_no: $(SRCDIR)/prime_table.c prime_table_yes: $(SRCDIR)/prime_table.pike test -f ./prime_table_yes || ln -s $(SRCDIR)/prime_table.pike ./prime_table_yes || cp $(SRCDIR)/prime_table.pike ./prime_table_yes -depend: prime_table.out - @dependencies@ diff --git a/src/modules/Gmp/configure.in b/src/modules/Gmp/configure.in index bf55658aee..83e2567564 100644 --- a/src/modules/Gmp/configure.in +++ b/src/modules/Gmp/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.28 2001/09/25 00:55:59 hubbe Exp $ +# $Id: configure.in,v 1.29 2002/01/27 00:54:00 mast Exp $ AC_INIT(mpz_glue.c) AC_CONFIG_HEADER(gmp_machine.h) AC_ARG_WITH(gmp, [ --with(out)-gmp Support bignums],[],[with_gmp=yes]) @@ -6,15 +6,6 @@ AC_ARG_WITH(bignums, [ --with(out)-bignums Support automatic bignum conversi AC_MODULE_INIT() -# Check if we're cross-compiling. - -CROSS="$ac_cv_prog_cc_cross" -# newer autoconf -if test x"$CROSS" = x; then - CROSS="$cross_compiling" -fi -AC_SUBST(CROSS) - ############################################################################# # Copied from ../../configure.in @@ -170,7 +161,7 @@ int main(int argc, char **argv) PIKE_FEATURE_WITHOUT([Gmp (bignums)]) -if test x$with_gmp = xyes -a "x$enable_binary" != "xno" ; then +if test x$with_gmp = xyes ; then PIKE_FEATURE_NODEP([Gmp (bignums)]) AC_CHECK_GMP(gmp2,gmp2/gmp.h,[ AC_CHECK_GMP(gmp,gmp.h,[ diff --git a/src/modules/Java/configure.in b/src/modules/Java/configure.in index 3cc7a7fcb7..af1747a007 100644 --- a/src/modules/Java/configure.in +++ b/src/modules/Java/configure.in @@ -22,7 +22,7 @@ AC_ARG_WITH(java-lib-dir, PIKE_FEATURE_WITHOUT(Java) -if test "x$with_java" = xyes -a "x$enable_binary" != xno; then +if test "x$with_java" = xyes; then PIKE_FEATURE_NODEP(Java) diff --git a/src/modules/Oracle/configure.in b/src/modules/Oracle/configure.in index 878f87f5ef..d60b0e7f68 100755 --- a/src/modules/Oracle/configure.in +++ b/src/modules/Oracle/configure.in @@ -1,5 +1,5 @@ # -# $Id: configure.in,v 1.32 2001/02/27 18:52:25 grubba Exp $ +# $Id: configure.in,v 1.33 2002/01/27 00:54:00 mast Exp $ # # Configure script for the oracle module # @@ -152,7 +152,11 @@ if test x$with_oracle = xyes; then oracle_include_dir="`cat conftest`" - AC_MSG_RESULT($oracle_include_dir/rdbms/demo/) + if test "$oracle_include_dir" = "no"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT($oracle_include_dir/rdbms/demo/) + fi AC_MSG_CHECKING(for sysliblist) @@ -193,7 +197,11 @@ if test x$with_oracle = xyes; then rm -f conftest AC_CHECK_LIB(aio, aioread, [oracle_aio=-laio], [oracle_aio=""]) - if test "x$oracle_lib_dir" = xno -o "x$oracle_include_dir" = xno; then :; + if test "x$oracle_lib_dir" = xno -o "x$oracle_include_dir" = xno; then + if test "x$enable_binary" = "xno"; then + AC_DEFINE(HAVE_ORACLE) + PIKE_FEATURE_OK(Oracle) + fi else CPPFLAGS="-I$oracle_include_dir/oci/include -I$oracle_include_dir/rdbms/demo/ -I$oracle_include_dir/rdbms/public/ -I$oracle_include_dir/network/public/ -I$oracle_include_dir/plsql/public -I$oracle_include_dir/otrace/public ${CPPFLAGS}" diff --git a/src/modules/Perl/configure.in b/src/modules/Perl/configure.in index c66c353d8b..e8a0dff255 100644 --- a/src/modules/Perl/configure.in +++ b/src/modules/Perl/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.11 2001/02/13 15:44:17 mirar Exp $ +# $Id: configure.in,v 1.12 2002/01/27 00:54:01 mast Exp $ AC_INIT(perlmod.c) AC_CONFIG_HEADER(perl_machine.h) @@ -14,9 +14,9 @@ if test "x$with_perl" = "xno"; then :; else PIKE_FEATURE_NODEP(Perl) if test "x$with_perl" = "xyes"; then - AC_CHECK_PROGS(perl, perl perl5, x) + MY_AC_CHECK_PROGS(perl, perl perl5, x) else - AC_CHECK_PROGS(perl, "$with_perl" perl perl5, x) + MY_AC_CHECK_PROGS(perl, "$with_perl" perl perl5, x) fi AC_MSG_CHECKING(if perl is embeddable) diff --git a/src/modules/_Crypto/lib/configure.in b/src/modules/_Crypto/lib/configure.in index 9e908f68c6..bf019a5ce6 100755 --- a/src/modules/_Crypto/lib/configure.in +++ b/src/modules/_Crypto/lib/configure.in @@ -1,17 +1,11 @@ -# $Id: configure.in,v 1.12 2000/11/27 12:42:36 mirar Exp $ +# $Id: configure.in,v 1.13 2002/01/27 00:54:01 mast Exp $ AC_INIT(sha.c) -MY_AC_PROG_CC +AC_MODULE_INIT() + AC_PROG_CPP AC_PROG_RANLIB -CROSS="$ac_cv_prog_cc_cross" -# newer autoconf -if test x"$CROSS" = x; then - CROSS="$cross_compiling" -fi -AC_SUBST(CROSS) - AC_C_CONST AC_OUTPUT(Makefile) diff --git a/src/modules/_Image_FreeType/configure.in b/src/modules/_Image_FreeType/configure.in index 97ddca6639..7efd93f7e2 100644 --- a/src/modules/_Image_FreeType/configure.in +++ b/src/modules/_Image_FreeType/configure.in @@ -10,7 +10,7 @@ if test "x$with_freetype" = "xyes" ; then PIKE_FEATURE_NODEP(Image.FreeType) - AC_PATH_PROG(FT_CONFIG, freetype-config, no) + MY_AC_PATH_PROG(FT_CONFIG, freetype-config, no) if test "$FT_CONFIG" = "no" ; then : diff --git a/src/modules/_Image_XFace/configure.in b/src/modules/_Image_XFace/configure.in index 19a86a1fbc..f93ccbad1d 100755 --- a/src/modules/_Image_XFace/configure.in +++ b/src/modules/_Image_XFace/configure.in @@ -1,15 +1,10 @@ -# $Id: configure.in,v 1.9 2001/09/25 00:56:00 hubbe Exp $ +# $Id: configure.in,v 1.10 2002/01/27 00:54:01 mast Exp $ AC_INIT(image_xface.c) AC_CONFIG_HEADER(config.h) AC_ARG_WITH(gmp, [ --with(out)-gmp Support bignums],[],[with_gmp=yes]) AC_MODULE_INIT() -# Check if we're cross-compiling. - -CROSS="$ac_cv_prog_cc_cross" -AC_SUBST(CROSS) - ############################################################################# # Copied from ../../configure.in diff --git a/src/modules/dynamic_module_makefile.in b/src/modules/dynamic_module_makefile.in index 15e52be734..12e6e8b681 100644 --- a/src/modules/dynamic_module_makefile.in +++ b/src/modules/dynamic_module_makefile.in @@ -1,5 +1,5 @@ # -# $Id: dynamic_module_makefile.in,v 1.78 2001/10/15 09:37:03 mast Exp $ +# $Id: dynamic_module_makefile.in,v 1.79 2002/01/27 00:53:59 mast Exp $ # @@ -54,7 +54,7 @@ dummy: $(DUMMY) linker_options modlist_headers modlist_segment module.so .SUFFIXES: .c .o .cmod -.cmod.c: +.cmod.c: $(BUILD_BASE)/precompile.sh-stamp $(BUILD_BASE)/precompile.pike $(BUILD_BASE)/precompile.sh precompile.pike >"$@" "$<" || { rm "$@"; exit 1; } @@ -114,14 +114,15 @@ clean: @for a in '' $(MODULE_SUBDIRS) ; do if test "x$$a" = "x"; then :; else echo cleaning $$a ; ( cd $$a ; $(MAKE) $(MAKE_FLAGS) clean ) ; fi ; done -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c \ +depend: $(SRC_TARGETS) $(PMOD_TARGETS) + -@echo Fixing dependencies for $(SRCDIR)/\*.c + @gcc -MM $(PREFLAGS) $(SRCDIR)/*.c \ |sed -e "s@ $(PIKE_SRC_DIR)/\([-a-zA-Z0-9.,_]*\)@ \$$(PIKE_SRC_DIR)/\1@g" \ |sed -e "s@ $(SRCDIR)/\([-a-zA-Z0-9.,_]*\)@ \$$(SRCDIR)/\1@g" \ |sed -e "s@ $(BUILD_BASE)/\([-a-zA-Z0-9.,_]*\)@ \$$(BUILD_BASE)/\1@g" \ |sed -e "s@$(SRCDIR)/\([-a-zA-Z0-9.,_]*\)@\1@g" \ >$(SRCDIR)/dependencies - CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status + @CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status @for a in '' $(MODULE_SUBDIRS) ; do \ if test "x$$a" = "x"; then :; else \ echo making depend in $$a; \ diff --git a/src/modules/files/configure.in b/src/modules/files/configure.in index 0191ece884..2a34da5c87 100644 --- a/src/modules/files/configure.in +++ b/src/modules/files/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.78 2001/06/25 12:34:55 grubba Exp $ +# $Id: configure.in,v 1.79 2002/01/27 00:54:02 mast Exp $ AC_INIT(file.c) AC_CONFIG_HEADER(file_machine.h) @@ -966,6 +966,9 @@ fi AC_MSG_CHECKING(size of socket buffers) AC_CACHE_VAL(pike_cv_socket_buffer_max, [ +if test "x$enable_binary" = "xno"; then + pike_cv_socket_buffer_max=0 +else AC_TRY_RUN([ #ifndef _LARGEFILE_SOURCE # define _FILE_OFFSET_BITS 64 @@ -1018,7 +1021,9 @@ pike_cv_socket_buffer_max=`cat conftest.out.2` , pike_cv_socket_buffer_max=0, pike_cv_socket_buffer_max=0 -)]) +) +fi +]) AC_DEFINE_UNQUOTED(SOCKET_BUFFER_MAX,$pike_cv_socket_buffer_max) AC_MSG_RESULT($pike_cv_socket_buffer_max) diff --git a/src/modules/static_module_makefile.in b/src/modules/static_module_makefile.in index b5f9fe41a3..7818baea9a 100644 --- a/src/modules/static_module_makefile.in +++ b/src/modules/static_module_makefile.in @@ -1,5 +1,5 @@ # -# $Id: static_module_makefile.in,v 1.69 2001/12/17 04:24:33 mast Exp $ +# $Id: static_module_makefile.in,v 1.70 2002/01/27 00:54:00 mast Exp $ # @@ -42,7 +42,7 @@ dummy: linker_options modlist_headers modlist_segment module.pmod module.a .SUFFIXES: .c .o .cmod -.cmod.c: +.cmod.c: $(BUILD_BASE)/precompile.sh-stamp $(BUILD_BASE)/precompile.pike $(BUILD_BASE)/precompile.sh precompile.pike >"$@" "$<" || { rm "$@"; exit 1; } # GCC dumps core on some files @ OSF1 @@ -121,9 +121,15 @@ clean: -rm -f *.o *.fail *.obj *.a *.so module.so module.pmod linker_options modlist_headers modlist_segment module_testsuite $(MODULE_CLEAN_EXTRA) @for a in '' $(MODULE_SUBDIRS) ; do if test "x$$a" = "x"; then :; else echo cleaning $$a ; ( cd $$a ; $(MAKE) $(MAKE_FLAGS) clean ) ; fi ; done -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh $(SRCDIR) - CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status +depend: $(SRC_TARGETS) $(PMOD_TARGETS) + -@echo Fixing dependencies for $(SRCDIR)/\*.c + @gcc -MM $(PREFLAGS) $(SRCDIR)/*.c \ + |sed -e "s@ $(PIKE_SRC_DIR)/\([-a-zA-Z0-9.,_]*\)@ \$$(PIKE_SRC_DIR)/\1@g" \ + |sed -e "s@ $(SRCDIR)/\([-a-zA-Z0-9.,_]*\)@ \$$(SRCDIR)/\1@g" \ + |sed -e "s@ $(BUILD_BASE)/\([-a-zA-Z0-9.,_]*\)@ \$$(BUILD_BASE)/\1@g" \ + |sed -e "s@$(SRCDIR)/\([-a-zA-Z0-9.,_]*\)@\1@g" \ + >$(SRCDIR)/dependencies + @CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status @for a in '' $(MODULE_SUBDIRS) ; do \ if test "x$$a" = "x"; then :; else \ echo making depend in $$a; \ diff --git a/src/post_modules/GTK/configure.in b/src/post_modules/GTK/configure.in index 6c0e81a02e..f23e882190 100644 --- a/src/post_modules/GTK/configure.in +++ b/src/post_modules/GTK/configure.in @@ -18,7 +18,7 @@ for module in . $3; do esac done -AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) +MY_AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) AC_MSG_CHECKING(for libglade) if test "$LIBGLADE_CONFIG" = "no"; then AC_MSG_RESULT(no) @@ -287,7 +287,7 @@ if test "x$with_GTK" = "xyes" ; then PIKE_FEATURE_NODEP(GTK.GladeXML) if test "x$with_GTK2" = "xyes" ; then PIKE_FEATURE_NODEP(GTK2) - AC_PATH_PROG(PKG_CONFIG,pkg-config,no) + MY_AC_PATH_PROG(PKG_CONFIG,pkg-config,no) else PKG_CONFIG=no fi @@ -297,7 +297,7 @@ AC_SUBST(have_gtk_20) AC_SUBST(have_gtk_120) if test "$PKG_CONFIG" = "no" ; then - AC_PATH_PROG(GTK_CONFIG, gtk-config,no) + MY_AC_PATH_PROG(GTK_CONFIG, gtk-config,no) AM_PATH_GTK(1.2.0,[have_gtk_120=gtk_120],[have_gtk_120=no_gtk_120]) if test x$have_gtk_120 = xno_gtk_120 ; then AM_PATH_GTK(1.1.13,[WITH_GTK=1],[WITH_GTK=0]) @@ -316,7 +316,7 @@ AC_SUBST(have_gtk_120) AC_CHECK_LIB(iconv,iconv,,,$GTK_LIBS) WITH_GTK=2 else - AC_PATH_PROG(GTK_CONFIG, gtk-config,no) + MY_AC_PATH_PROG(GTK_CONFIG, gtk-config,no) AM_PATH_GTK(1.2.0,[have_gtk_120=gtk_120],[have_gtk_120=no_gtk_120]) if test x$have_gtk_120 = xno_gtk_120 ; then AM_PATH_GTK(1.1.13,[WITH_GTK=1],[WITH_GTK=0]) @@ -409,7 +409,7 @@ if test "x$WITH_GTK" = x1 ; then if test "x$with_gnome" = "xyes"; then PIKE_FEATURE_NODEP(Gnome) - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) + MY_AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) if test "$GNOME_CONFIG" = "no"; then : diff --git a/src/post_modules/Unicode/Makefile.in b/src/post_modules/Unicode/Makefile.in index 6e006f30b8..b6bd2160e9 100644 --- a/src/post_modules/Unicode/Makefile.in +++ b/src/post_modules/Unicode/Makefile.in @@ -1,15 +1,17 @@ -# $Id: Makefile.in,v 1.3 2001/07/01 11:36:34 grubba Exp $ +# $Id: Makefile.in,v 1.4 2002/01/27 00:54:02 mast Exp $ @make_variables@ VPATH=@srcdir@:@srcdir@/../..:../.. OBJS=unicode_module.o normalize.o split.o buffer.o MODULE_LDFLAGS=@LDFLAGS@ @LIBS@ CONFIG_HEADERS=@CONFIG_HEADERS@ +SRC_TARGETS=$(SRCDIR)/wordbits.h \ + $(SRCDIR)/decompositions.h $(SRCDIR)/canonicals.h @dynamic_module_makefile@ UNICODEDATA=../../UnicodeData.txt -$(SRCDIR)/unicode_module.c: $(SRCDIR)/unicode_module.cmod $(TMP_BINDIR)/precompile.pike - $(RUNPIKE) $(TMP_BINDIR)/precompile.pike >"$@" "$(SRCDIR)/unicode_module.cmod" || { rm "$@"; exit 1; } +# UnixWare make needs help to find the source file... +unicode_module.o: $(SRCDIR)/unicode_module.c $(SRCDIR)/decompositions.h: $(SRCDIR)/make_decompose.pike $(SRCDIR)/$(UNICODEDATA) $(RUNPIKE) $(SRCDIR)/make_decompose.pike \ -- GitLab