From 44f795f7feef198729a978ff84c4c2dc9efbc1b3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 5 Feb 1996 21:14:14 +0000 Subject: [PATCH] Support for building as a shared library, based on patches from Alan Modra : * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib. New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK. * configure: Rebuild. * configure.host: If --enable-shared, adjust shared library stuff based on the host. If the host is SunOS, and the linker supports -rpath, set HLDFLAGS to use it. * Makefile.in (ALLLIBS): New variable. (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables. (COMMON_SHLIB, SHLINK): New variables. (.c.o): If PICFLAG is set, compile twice, once PIC, once normal. (STAGESTUFF): Remove variable. (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than $(TARGETLIB). (stamp-ofiles): New target, like old ofiles target, but build using a temporary file and move-if-change, and touch stamp-ofiles when done. (ofiles): Just depend upon stamp-ofiles. (stamp-piclist, piclist): New targets. ($(SHLIB), $(SHLINK)): New targets. (targets.o, archures.o): Build twice if PICFLAG is set. (do_mostlyclean): Remove pic/*.o. (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and stamp-piclist. (do_distclean): Remove pic and stamp-picdir. (install): Install shared libraries. ($(OFILES)): Depend upon stamp-picdir. (stamp-picdir): New target. --- bfd/ChangeLog | 31 +++++++++++++ bfd/Makefile.in | 96 +++++++++++++++++++++++++++++++-------- bfd/configure | 96 +++++++++++++++++++++++++++++++++------ bfd/configure.host | 74 ++++++++++++++++++++++++++++++ bfd/configure.in | 109 +++++++++++++++++++++++++++++++-------------- 5 files changed, 341 insertions(+), 65 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1b3e8f9c360..0f9d051b711 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,36 @@ Mon Feb 5 10:38:27 1996 Ian Lance Taylor + Support for building as a shared library, based on patches from + Alan Modra : + * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib. + New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC, + SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK. + * configure: Rebuild. + * configure.host: If --enable-shared, adjust shared library stuff + based on the host. If the host is SunOS, and the linker supports + -rpath, set HLDFLAGS to use it. + * Makefile.in (ALLLIBS): New variable. + (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables. + (COMMON_SHLIB, SHLINK): New variables. + (.c.o): If PICFLAG is set, compile twice, once PIC, once normal. + (STAGESTUFF): Remove variable. + (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than + $(TARGETLIB). + (stamp-ofiles): New target, like old ofiles target, but build + using a temporary file and move-if-change, and touch stamp-ofiles + when done. + (ofiles): Just depend upon stamp-ofiles. + (stamp-piclist, piclist): New targets. + ($(SHLIB), $(SHLINK)): New targets. + (targets.o, archures.o): Build twice if PICFLAG is set. + (do_mostlyclean): Remove pic/*.o. + (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and + stamp-piclist. + (do_distclean): Remove pic and stamp-picdir. + (install): Install shared libraries. + ($(OFILES)): Depend upon stamp-picdir. + (stamp-picdir): New target. + * libcoff-in.h: Add comment reminding people that libcoff.h is a generated file. * libcoff.h: Rebuild. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index dec54f3da2e..b3bc75070b5 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -57,6 +57,15 @@ CFLAGS = @CFLAGS@ MAKEINFO = makeinfo RANLIB = @RANLIB@ +ALLLIBS = @ALLLIBS@ + +PICFLAG = @PICFLAG@ +SHLIB = @SHLIB@ +SHLIB_CC = @SHLIB_CC@ +SHLIB_CFLAGS = @SHLIB_CFLAGS@ +COMMON_SHLIB = @COMMON_SHLIB@ +SHLINK = @SHLINK@ + CC_FOR_BUILD = @CC_FOR_BUILD@ INCDIR = $(srcdir)/../include @@ -392,6 +401,9 @@ FLAGS_TO_PASS = \ ALL_CFLAGS=@HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) $(CFLAGS) .c.o: + if [ -n "$(PICFLAG)" ]; then \ + $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \ + else true; fi $(CC) -c $(ALL_CFLAGS) $< bfd_libs_here = @@ -415,9 +427,7 @@ HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \ libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h libnlm.h \ liboasys.h nlm-target.h nlmcode.h som.h genlink.h netbsd.h -STAGESTUFF = $(TARGETLIB) $(OFILES) - -all: Makefile $(TARGETLIB) +all: Makefile $(ALLLIBS) @PICLIST@ @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) .NOEXPORT: @@ -448,8 +458,8 @@ diststuff: info # COREFILE Core file routines for a native configuration OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ -ofiles : Makefile - rm -f ofiles +stamp-ofiles: Makefile + rm -f tofiles f=""; \ for i in $(OFILES) ; do \ case " $$f " in \ @@ -457,7 +467,11 @@ ofiles : Makefile *) f="$$f $$i" ;; \ esac ; \ done ; \ - echo $$f > ofiles + echo $$f > tofiles + $(srcdir)/../move-if-change tofiles ofiles + touch stamp-ofiles + +ofiles: stamp-ofiles ; @true $(TARGETLIB): $(OFILES) ofiles rm -f $(TARGETLIB) @@ -465,14 +479,40 @@ $(TARGETLIB): $(OFILES) ofiles $(AR) $(AR_FLAGS) $(TARGETLIB) `cat ofiles` $(RANLIB) $(TARGETLIB) +stamp-piclist: ofiles + rm -f tpiclist + if [ -n "$(PICFLAG)" ]; then \ + sed -e 's,\([^ ][^ ]*\),pic/\1,g' ofiles > tpiclist; \ + else \ + cp ofiles tpiclist; \ + fi + $(srcdir)/../move-if-change tpiclist piclist + touch stamp-piclist + +piclist: stamp-piclist ; @true + +$(SHLIB): stamp-picdir $(OFILES) piclist + rm -f $(SHLIB) + $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist` + +$(SHLINK): $(SHLIB) + rm -f $(SHLINK) + ln -sf $(SHLIB) $(SHLINK) + # When compiling archures.c and targets.c, supply the default target # info from configure. targets.o: targets.c Makefile - $(CC) -c $(ALL_CFLAGS) $(TDEFAULTS) $< + if [ -n "$(PICFLAG)" ]; then \ + $(CC) -c $(PICFLAG) $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/targets.c -o pic/targets.o; \ + else true; fi + $(CC) -c $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/targets.c archures.o: archures.c Makefile - $(CC) -c $(ALL_CFLAGS) $(TDEFAULTS) $< + if [ -n "$(PICFLAG)" ]; then \ + $(CC) -c $(PICFLAG) $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/archures.c -o pic/archures.o; \ + else true; fi + $(CC) -c $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/archures.c elf32-target.h : elfxx-target.h rm -f elf32-target.h @@ -499,13 +539,15 @@ TAGS: force etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c do_mostlyclean: - rm -f *.o *~ core *.E *.p *.ip aout-params.h gen-aout config.log + rm -f *.o *~ core *.E *.p *.ip aout-params.h gen-aout config.log \ + pic/*.o do_clean: do_mostlyclean - rm -f libbfd.a TAGS bfd.h stmp-bfd.h ofiles \ - elf32-target.h elf64-target.h + rm -f libbfd.a TAGS bfd.h stmp-bfd.h ofiles stamp-ofiles \ + elf32-target.h elf64-target.h $(SHLIB) $(SHLINK) \ + piclist stamp-piclist do_distclean: do_clean rm -f Makefile config.status config.cache config.h stamp-h - + rm -rf pic stamp-picdir do_maintainer_clean: do_distclean rm -f $(srcdir)/bfd-in2.h $(srcdir)/libbfd.h $(srcdir)/libcoff.h @@ -581,9 +623,19 @@ roll: # force: -install: - $(INSTALL_DATA) libbfd.a $(libdir)/libbfd.a - $(RANLIB) $(libdir)/libbfd.a +install: $(ALLLIBS) + for f in $(ALLLIBS); do \ + rm -f $(libdir)/$$f; \ + if [ "$$f" = "$(SHLINK)" ]; then \ + ln -sf $(SHLIB) $(libdir)/$$f; \ + elif [ "$$f" = "$(SHLIB)" ]; then \ + $(INSTALL_PROGRAM) $$f $(libdir)/$$f; \ + else \ + $(INSTALL_DATA) $$f $(libdir)/$$f; \ + $(RANLIB) $(libdir)/$$f; \ + chmod a-x $(libdir)/$$f; \ + fi; \ + done # Install BFD include file, and others that it needs. Install them # both in GCC's include directory, and in the system include dir # if configured as $(oldincludedir) -- which it usually isnt. @@ -682,15 +734,15 @@ headers: # The rules for the generated header files are here so that people can # type `make bfd-in2.h' if they remove it. They are not run by default. bfd-in2.h: - (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS)) + (cd $(docdir); $(MAKE) bfd.h $(FLAGS_TO_PASS)) cp $(docdir)/bfd.h bfd-in2.h-new $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h libbfd.h: - (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS)) + (cd $(docdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS)) cp $(docdir)/libbfd.h libbfd.h-new $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h libcoff.h: - (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS)) + (cd $(docdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS)) cp $(docdir)/libcoff.h libcoff.h-new $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h @@ -709,6 +761,14 @@ elf32-arc.o: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/arc.h elf32-target.h end-sanitize-arc: +$(OFILES): stamp-picdir + +stamp-picdir: + if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \ + mkdir pic; \ + else true; fi + touch stamp-picdir + # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. diff --git a/bfd/configure b/bfd/configure index b4597dae5d8..923f5c0e323 100755 --- a/bfd/configure +++ b/bfd/configure @@ -15,6 +15,10 @@ ac_help="$ac_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" ac_help="$ac_help --enable-targets alternative target configurations" +ac_help="$ac_help + --enable-shared build shared BFD library" +ac_help="$ac_help + --enable-commonbfdlib build shared BFD/opcodes/libiberty library" ac_help="$ac_help --with-mmap try using mmap for BFD input files if available" @@ -543,6 +547,24 @@ if test "${enable_targets+set}" = set; then *) enable_targets=$enableval ;; esac fi +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + case "${enableval}" in + yes) shared=true ;; + no) shared=false ;; + *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;; +esac +fi +# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. +if test "${enable_commonbfdlib+set}" = set; then + enableval="$enable_commonbfdlib" + case "${enableval}" in + yes) commonbfdlib=true ;; + no) commonbfdlib=false ;; + *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; +esac +fi # Check whether --with-mmap or --without-mmap was given. if test "${with_mmap+set}" = set; then withval="$with_mmap" @@ -690,6 +712,21 @@ target64=false # host stuff: +ALLLIBS='$(TARGETLIB)' +PICFLAG= +SHLIB= +SHLINK= +if test "${shared}" = "true"; then + PICFLAG=-fpic + if test "${commonbfdlib}" = "true"; then + ALLLIBS='$(TARGETLIB)' + else + ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)' + SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION` + SHLINK=libbfd.so + fi +fi + # Permit host specific settings. . ${srcdir}/configure.host @@ -886,6 +923,31 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +if test "${shared}" = "true"; then + if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then + echo "configure: warning: BFD --enable-shared only supported when using gcc" 1>&2 + shared=false + PICFLAG= + SHLIB= + fi +fi + + + + + + +if test "${commonbfdlib}" = "true"; then + COMMON_SHLIB=yes + PICLIST=piclist +else + COMMON_SHLIB= + PICLIST= +fi + + + + HOST_64BIT_LONG=0 if test "x${HOST_64BIT_TYPE}" = "xlong"; then HOST_64BIT_LONG=1 @@ -901,7 +963,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext < conftest.$ac_ext < Syntax Error @@ -957,7 +1019,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -990,7 +1052,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1026,7 +1088,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1061,7 +1123,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <> confdefs.h <<\EOF #define USE_BINARY_FOPEN 1 EOF @@ -1120,7 +1182,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1160,7 +1222,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1460,7 +1522,7 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1747,7 +1809,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.c + ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t + if grep 'unrecognized' conftest.t >/dev/null 2>&1; then + : + elif grep 'No such file' conftest.t >/dev/null 2>&1; then + : + else + HLDFLAGS='-Wl,-rpath=' + fi + rm -f conftest.t conftest.c conftest + ;; +esac diff --git a/bfd/configure.in b/bfd/configure.in index 8b18868c7cb..f18017b093c 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -18,6 +18,27 @@ AC_ARG_ENABLE(targets, no) enable_targets= ;; *) enable_targets=$enableval ;; esac])dnl +AC_ARG_ENABLE(shared, +[ --enable-shared build shared BFD library], +[case "${enableval}" in + yes) shared=true ;; + no) shared=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;; +esac])dnl +AC_ARG_ENABLE(commonbfdlib, +[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], +[case "${enableval}" in + yes) commonbfdlib=true ;; + no) commonbfdlib=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; +esac])dnl +AC_ARG_WITH(mmap, +[ --with-mmap try using mmap for BFD input files if available], +[case "${withval}" in + yes) want_mmap=true ;; + no) want_mmap=false ;; + *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; +esac],[want_mmap=false])dnl AC_CONFIG_HEADER(config.h:config.in) @@ -33,6 +54,23 @@ target64=false # host stuff: +ALLLIBS='$(TARGETLIB)' +PICFLAG= +SHLIB= +SHLINK= +if test "${shared}" = "true"; then + PICFLAG=-fpic + if test "${commonbfdlib}" = "true"; then + ALLLIBS='$(TARGETLIB)' + else + ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)' +changequote(,)dnl + SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION` +changequote([,])dnl + SHLINK=libbfd.so + fi +fi + # Permit host specific settings. . ${srcdir}/configure.host @@ -43,6 +81,31 @@ AC_CHECK_PROG(AR, ar, ar, :) AC_PROG_RANLIB AC_PROG_INSTALL +if test "${shared}" = "true"; then + if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then + AC_MSG_WARN([BFD --enable-shared only supported when using gcc]) + shared=false + PICFLAG= + SHLIB= + fi +fi + +AC_SUBST(ALLLIBS) +AC_SUBST(PICFLAG) +AC_SUBST(SHLIB) +AC_SUBST(SHLIB_CC) +AC_SUBST(SHLIB_CFLAGS) +if test "${commonbfdlib}" = "true"; then + COMMON_SHLIB=yes + PICLIST=piclist +else + COMMON_SHLIB= + PICLIST= +fi +AC_SUBST(COMMON_SHLIB) +AC_SUBST(PICLIST) +AC_SUBST(SHLINK) + HOST_64BIT_LONG=0 if test "x${HOST_64BIT_TYPE}" = "xlong"; then HOST_64BIT_LONG=1 @@ -57,39 +120,8 @@ AC_CHECK_FUNCS(fcntl getpagesize) BFD_BINARY_FOPEN -AC_MSG_CHECKING([whether malloc must be declared]) -AC_CACHE_VAL(bfd_cv_decl_needed_malloc, -[AC_TRY_COMPILE([ -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif], -[char *(*pfn) = (char *(*)) malloc], -bfd_cv_decl_needed_malloc=no, bfd_cv_decl_needed_malloc=yes)]) -AC_MSG_RESULT($bfd_cv_decl_needed_malloc) -if test $bfd_cv_decl_needed_malloc = yes; then - AC_DEFINE(NEED_DECLARATION_MALLOC) -fi - -AC_MSG_CHECKING([whether free must be declared]) -AC_CACHE_VAL(bfd_cv_decl_needed_free, -[AC_TRY_COMPILE([ -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif], -[int (*pfn) = (int (*)) free], -bfd_cv_decl_needed_free=no, bfd_cv_decl_needed_free=yes)]) -AC_MSG_RESULT($bfd_cv_decl_needed_free) -if test $bfd_cv_decl_needed_free = yes; then - AC_DEFINE(NEED_DECLARATION_FREE) -fi +BFD_NEED_DECLARATION(malloc) +BFD_NEED_DECLARATION(free) # If we are configured native, pick a core file support file. COREFILE= @@ -215,6 +247,10 @@ changequote([,])dnl COREFILE=trad-core.o AC_DEFINE(TRAD_HEADER,"hosts/m68knbsd.h") ;; + m68*-apple-aux*) + COREFILE=trad-core.o + AC_DEFINE(TRAD_HEADER,"hosts/m68kaux.h") + ;; m88*-*-sysv4*) ;; m88*-motorola-sysv*) COREFILE=ptrace-core.o ;; m88*-*-mach3*) @@ -411,8 +447,9 @@ do hp300hpux_vec) tb="$tb hp300hpux.o aout32.o stab-syms.o" ;; i386aout_vec) tb="$tb i386aout.o aout32.o stab-syms.o" ;; i386bsd_vec) tb="$tb i386bsd.o aout32.o stab-syms.o" ;; - i386dynix_vec) tb="$tb i386dynix.o aout32.o stab-syms.o" ;; i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;; + i386dynix_vec) tb="$tb i386dynix.o aout32.o stab-syms.o" ;; + i386freebsd_vec) tb="$tb i386freebsd.o aout32.o stab-syms.o" ;; i386msdos_vec) tb="$tb i386msdos.o" ;; i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;; i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;; @@ -432,6 +469,7 @@ do m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;; m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;; m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o stab-syms.o" ;; + m68kaux_coff_vec) tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;; m88kbcs_vec) tb="$tb coff-m88k.o" ;; newsos3_vec) tb="$tb newsos3.o aout32.o stab-syms.o" ;; nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;; @@ -535,6 +573,9 @@ AC_SUBST(tdefaults) dnl AC_CHECK_HEADERS(sys/mman.h) AC_FUNC_MMAP AC_CHECK_FUNCS(madvise mprotect) +case ${want_mmap}+${ac_cv_func_mmap} in + true+yes ) AC_DEFINE(USE_MMAP) ;; +esac rm -f doc/config.status AC_OUTPUT(Makefile doc/Makefile, -- 2.30.2