mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-03-07 15:37:05 +08:00
Inadvertently placed this in the HEAD branch.
This commit is contained in:
parent
332942dd32
commit
c28f1af446
@ -1,23 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies foreign
|
||||
|
||||
EXTRA_DIST = acinclude.m4
|
||||
|
||||
noinst_LTLIBRARIES = libfoo.la
|
||||
|
||||
libfoo_la_SOURCES = foo.cpp
|
||||
libfoo_la_LIBADD = $(LIBM)
|
||||
|
||||
noinst_HEADERS = foo.h
|
||||
|
||||
bin_PROGRAMS = tagdemo
|
||||
|
||||
tagdemo_SOURCES = main.cpp
|
||||
tagdemo_LDADD = libfoo.la
|
||||
|
||||
$(OBJECTS): libtool
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
@ -1,409 +0,0 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_alias = @build_alias@
|
||||
build_triplet = @build@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
target_alias = @target_alias@
|
||||
target_triplet = @target@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LIBM = @LIBM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies foreign
|
||||
|
||||
EXTRA_DIST = acinclude.m4
|
||||
|
||||
noinst_LTLIBRARIES = libfoo.la
|
||||
|
||||
libfoo_la_SOURCES = foo.cpp
|
||||
libfoo_la_LIBADD = $(LIBM)
|
||||
|
||||
noinst_HEADERS = foo.h
|
||||
|
||||
bin_PROGRAMS = tagdemo
|
||||
|
||||
tagdemo_SOURCES = main.cpp
|
||||
tagdemo_LDADD = libfoo.la
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libfoo_la_LDFLAGS =
|
||||
libfoo_la_DEPENDENCIES =
|
||||
libfoo_la_OBJECTS = foo.lo
|
||||
bin_PROGRAMS = tagdemo$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
tagdemo_OBJECTS = main.$(OBJEXT)
|
||||
tagdemo_DEPENDENCIES = libfoo.la
|
||||
tagdemo_LDFLAGS =
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = README Makefile.am Makefile.in acinclude.m4 aclocal.m4 \
|
||||
configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(libfoo_la_SOURCES) $(tagdemo_SOURCES)
|
||||
OBJECTS = $(libfoo_la_OBJECTS) $(tagdemo_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .cpp .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): configure.in acinclude.m4
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLTLIBRARIES:
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
|
||||
distclean-noinstLTLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLTLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libfoo.la: $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES)
|
||||
$(CXXLINK) $(libfoo_la_LDFLAGS) $(libfoo_la_OBJECTS) $(libfoo_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
tagdemo$(EXEEXT): $(tagdemo_OBJECTS) $(tagdemo_DEPENDENCIES)
|
||||
@rm -f tagdemo$(EXEEXT)
|
||||
$(CXXLINK) $(tagdemo_LDFLAGS) $(tagdemo_OBJECTS) $(tagdemo_LDADD) $(LIBS)
|
||||
.cpp.o:
|
||||
$(CXXCOMPILE) -c $<
|
||||
.cpp.obj:
|
||||
$(CXXCOMPILE) -c `cygpath -w $<`
|
||||
.cpp.lo:
|
||||
$(LTCXXCOMPILE) -c $<
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-binPROGRAMS \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
|
||||
clean-binPROGRAMS clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-binPROGRAMS distclean-tags \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-binPROGRAMS maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
|
||||
clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool mostlyclean-binPROGRAMS \
|
||||
distclean-binPROGRAMS clean-binPROGRAMS maintainer-clean-binPROGRAMS \
|
||||
uninstall-binPROGRAMS install-binPROGRAMS tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
$(OBJECTS): libtool
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,8 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
This directory contains a sample package that demonstrates the use of
|
||||
GNU Libtool's multi-language support through the use of configuration
|
||||
tags. It requires GNU autoconf, automake and of course libtool.
|
||||
|
||||
The demonstration generates a libraries using the same libtool script,
|
||||
which is then linked to a C++ program.
|
@ -1,706 +0,0 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-2000 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 42 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
||||
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
||||
# Autoconf's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
|
||||
AC_REQUIRE([AC_OBJEXT])dnl
|
||||
AC_REQUIRE([AC_EXEEXT])dnl
|
||||
dnl
|
||||
|
||||
# Only perform the check for file, if the check method requires it
|
||||
case "$deplibs_check_method" in
|
||||
file_magic*)
|
||||
if test "$file_magic_cmd" = '$FILE'; then
|
||||
AC_PATH_FILE
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
AC_CHECK_TOOL(STRIP, strip, :)
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
AC_ARG_WITH(pic,
|
||||
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
||||
pic_mode="$withval", pic_mode=default)
|
||||
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
|
||||
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
||||
# recent cygwin and mingw systems supply a stub DllMain which the user
|
||||
# can override, but on older systems we have to supply one
|
||||
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
|
||||
[AC_TRY_LINK([],
|
||||
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
|
||||
DllMain (0, 0, 0);],
|
||||
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
|
||||
|
||||
case "$lt_target/$CC" in
|
||||
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
|
||||
# old mingw systems require "-dll" to link a DLL, while more recent ones
|
||||
# require "-mdll"
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -mdll"
|
||||
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
|
||||
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
|
||||
CFLAGS="$SAVE_CFLAGS" ;;
|
||||
*-*-cygwin*)
|
||||
# cygwin systems need to pass --dll to the linker, and not link
|
||||
# crt.o which will require a WinMain@16 definition.
|
||||
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
|
||||
esac
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
|
||||
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
|
||||
AC_DEFUN(AC_PATH_TOOL_PREFIX,
|
||||
[AC_MSG_CHECKING([for $1])
|
||||
AC_CACHE_VAL(lt_cv_path_FILE,
|
||||
[case "$FILE" in
|
||||
/*)
|
||||
lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
|
||||
;;
|
||||
?:/*)
|
||||
ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
|
||||
;;
|
||||
*)
|
||||
ac_save_file="$FILE"
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
dnl $ac_dummy forces splitting on constant user-supplied paths.
|
||||
dnl POSIX.2 word splitting is done only on the output of word expansions,
|
||||
dnl not every word. This closes a longstanding sh security hole.
|
||||
ac_dummy="ifelse([$2], , $PATH, [$2])"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$1; then
|
||||
lt_cv_path_FILE="$ac_dir/$1"
|
||||
if test -n "$file_magic_test_file"; then
|
||||
case "$deplibs_check_method" in
|
||||
"file_magic "*)
|
||||
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
|
||||
FILE="$lt_cv_path_FILE"
|
||||
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
|
||||
egrep "$file_magic_regex" > /dev/null; then
|
||||
:
|
||||
else
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: the command libtool uses to detect shared libraries,
|
||||
*** $file_magic_cmd, produces output that libtool cannot recognize.
|
||||
*** The result is that libtool may fail to recognize shared libraries
|
||||
*** as such. This will affect the creation of libtool libraries that
|
||||
*** depend on shared libraries, but programs linked with such libtool
|
||||
*** libraries will work regardless of this problem. Nevertheless, you
|
||||
*** may want to report the problem to your system manager and/or to
|
||||
*** bug-libtool@gnu.org
|
||||
|
||||
EOF
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
FILE="$ac_save_file"
|
||||
;;
|
||||
esac])
|
||||
FILE="$lt_cv_path_FILE"
|
||||
if test -n "$FILE"; then
|
||||
AC_MSG_RESULT($FILE)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PATH_FILE - find a file program which can recognise a shared library
|
||||
AC_DEFUN(AC_PATH_FILE,
|
||||
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
|
||||
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
|
||||
if test -z "$lt_cv_path_FILE"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
|
||||
else
|
||||
FILE=:
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $lt_target in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
with_gnu_ld=$ac_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
|
||||
# -- PORTME Some linkers may need a different reload flag.
|
||||
AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
|
||||
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
|
||||
[lt_cv_ld_reload_flag='-r'])
|
||||
reload_flag=$lt_cv_ld_reload_flag
|
||||
test -n "$reload_flag" && reload_flag=" $reload_flag"
|
||||
])
|
||||
|
||||
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
||||
# -- PORTME fill in with the dynamic library characteristics
|
||||
AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
|
||||
[AC_CACHE_CHECK([how to recognise dependant libraries],
|
||||
lt_cv_deplibs_check_method,
|
||||
[lt_cv_file_magic_cmd='$FILE'
|
||||
lt_cv_file_magic_test_file=
|
||||
lt_cv_deplibs_check_method='unknown'
|
||||
# Need to set the preceding variable on all platforms that support
|
||||
# interlibrary dependencies.
|
||||
# 'none' -- dependencies not supported.
|
||||
# `unknown' -- same as none, but documents that we really don't know.
|
||||
# 'pass_all' -- all dependencies passed with no checks.
|
||||
# 'test_compile' -- check by making test program.
|
||||
# 'file_magic [regex]' -- check by looking for files in library path
|
||||
# which responds to the $file_magic_cmd with a given egrep regex.
|
||||
# If you have `file' or equivalent on your system and you're not sure
|
||||
# whether `pass_all' will *always* work, you probably want this one.
|
||||
|
||||
case "$host_os" in
|
||||
aix4* | beos*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
||||
lt_cv_file_magic_cmd='${OBJDUMP} -f'
|
||||
;;
|
||||
|
||||
freebsd*)
|
||||
case "$version_type" in
|
||||
freebsd-elf*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
||||
;;
|
||||
*)
|
||||
case "$LD" in
|
||||
*-32|*"-32 ") libmagic=32-bit;;
|
||||
*-n32|*"-n32 ") libmagic=N32;;
|
||||
*-64|*"-64 ") libmagic=64-bit;;
|
||||
*) libmagic=never-match;;
|
||||
esac
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
|
||||
;;
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux-gnu*)
|
||||
case "$host_cpu" in
|
||||
alpha* | i*86 | sparc* )
|
||||
lt_cv_deplibs_check_method=pass_all ;;
|
||||
*)
|
||||
# glibc up to 2.1.1 does not perform some relocations on ARM
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
osf3* | osf4* | osf5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
lt_cv_file_magic_test_file=/lib/libc.so
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
case "$host_vendor" in
|
||||
ncr)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
motorola)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
])
|
||||
file_magic_cmd=$lt_cv_file_magic_cmd
|
||||
deplibs_check_method=$lt_cv_deplibs_check_method
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_CXX - enable support for C++ libraries
|
||||
AC_DEFUN(AC_LIBTOOL_CXX,
|
||||
[AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_REQUIRE([AC_PROG_LIBTOOL])
|
||||
lt_save_CC="$CC"
|
||||
lt_save_CFLAGS="$CFLAGS"
|
||||
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
||||
dnl is set to the C++ compiler.
|
||||
AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" \
|
||||
deplibs_check_method="$deplibs_check_method" \
|
||||
file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
||||
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh \
|
||||
|| AC_MSG_ERROR([libtool tag configuration failed])
|
||||
CC="$lt_save_CC"
|
||||
CFLAGS="$lt_save_CFLAGS"
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
789
tagdemo/aclocal.m4
vendored
789
tagdemo/aclocal.m4
vendored
@ -1,789 +0,0 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
# serial 42 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
||||
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
||||
# Autoconf's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
|
||||
AC_REQUIRE([AC_OBJEXT])dnl
|
||||
AC_REQUIRE([AC_EXEEXT])dnl
|
||||
dnl
|
||||
|
||||
# Only perform the check for file, if the check method requires it
|
||||
case "$deplibs_check_method" in
|
||||
file_magic*)
|
||||
if test "$file_magic_cmd" = '$FILE'; then
|
||||
AC_PATH_FILE
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
AC_CHECK_TOOL(STRIP, strip, :)
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
AC_ARG_WITH(pic,
|
||||
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
||||
pic_mode="$withval", pic_mode=default)
|
||||
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
|
||||
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
||||
# recent cygwin and mingw systems supply a stub DllMain which the user
|
||||
# can override, but on older systems we have to supply one
|
||||
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
|
||||
[AC_TRY_LINK([],
|
||||
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
|
||||
DllMain (0, 0, 0);],
|
||||
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
|
||||
|
||||
case "$lt_target/$CC" in
|
||||
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
|
||||
# old mingw systems require "-dll" to link a DLL, while more recent ones
|
||||
# require "-mdll"
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -mdll"
|
||||
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
|
||||
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
|
||||
CFLAGS="$SAVE_CFLAGS" ;;
|
||||
*-*-cygwin*)
|
||||
# cygwin systems need to pass --dll to the linker, and not link
|
||||
# crt.o which will require a WinMain@16 definition.
|
||||
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
|
||||
esac
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
|
||||
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
|
||||
AC_DEFUN(AC_PATH_TOOL_PREFIX,
|
||||
[AC_MSG_CHECKING([for $1])
|
||||
AC_CACHE_VAL(lt_cv_path_FILE,
|
||||
[case "$FILE" in
|
||||
/*)
|
||||
lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
|
||||
;;
|
||||
?:/*)
|
||||
ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
|
||||
;;
|
||||
*)
|
||||
ac_save_file="$FILE"
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
dnl $ac_dummy forces splitting on constant user-supplied paths.
|
||||
dnl POSIX.2 word splitting is done only on the output of word expansions,
|
||||
dnl not every word. This closes a longstanding sh security hole.
|
||||
ac_dummy="ifelse([$2], , $PATH, [$2])"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$1; then
|
||||
lt_cv_path_FILE="$ac_dir/$1"
|
||||
if test -n "$file_magic_test_file"; then
|
||||
case "$deplibs_check_method" in
|
||||
"file_magic "*)
|
||||
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
|
||||
FILE="$lt_cv_path_FILE"
|
||||
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
|
||||
egrep "$file_magic_regex" > /dev/null; then
|
||||
:
|
||||
else
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: the command libtool uses to detect shared libraries,
|
||||
*** $file_magic_cmd, produces output that libtool cannot recognize.
|
||||
*** The result is that libtool may fail to recognize shared libraries
|
||||
*** as such. This will affect the creation of libtool libraries that
|
||||
*** depend on shared libraries, but programs linked with such libtool
|
||||
*** libraries will work regardless of this problem. Nevertheless, you
|
||||
*** may want to report the problem to your system manager and/or to
|
||||
*** bug-libtool@gnu.org
|
||||
|
||||
EOF
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
FILE="$ac_save_file"
|
||||
;;
|
||||
esac])
|
||||
FILE="$lt_cv_path_FILE"
|
||||
if test -n "$FILE"; then
|
||||
AC_MSG_RESULT($FILE)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PATH_FILE - find a file program which can recognise a shared library
|
||||
AC_DEFUN(AC_PATH_FILE,
|
||||
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
|
||||
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
|
||||
if test -z "$lt_cv_path_FILE"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
|
||||
else
|
||||
FILE=:
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $lt_target in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
with_gnu_ld=$ac_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
|
||||
# -- PORTME Some linkers may need a different reload flag.
|
||||
AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
|
||||
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
|
||||
[lt_cv_ld_reload_flag='-r'])
|
||||
reload_flag=$lt_cv_ld_reload_flag
|
||||
test -n "$reload_flag" && reload_flag=" $reload_flag"
|
||||
])
|
||||
|
||||
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
||||
# -- PORTME fill in with the dynamic library characteristics
|
||||
AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
|
||||
[AC_CACHE_CHECK([how to recognise dependant libraries],
|
||||
lt_cv_deplibs_check_method,
|
||||
[lt_cv_file_magic_cmd='$FILE'
|
||||
lt_cv_file_magic_test_file=
|
||||
lt_cv_deplibs_check_method='unknown'
|
||||
# Need to set the preceding variable on all platforms that support
|
||||
# interlibrary dependencies.
|
||||
# 'none' -- dependencies not supported.
|
||||
# `unknown' -- same as none, but documents that we really don't know.
|
||||
# 'pass_all' -- all dependencies passed with no checks.
|
||||
# 'test_compile' -- check by making test program.
|
||||
# 'file_magic [regex]' -- check by looking for files in library path
|
||||
# which responds to the $file_magic_cmd with a given egrep regex.
|
||||
# If you have `file' or equivalent on your system and you're not sure
|
||||
# whether `pass_all' will *always* work, you probably want this one.
|
||||
|
||||
case "$host_os" in
|
||||
aix4* | beos*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
||||
lt_cv_file_magic_cmd='${OBJDUMP} -f'
|
||||
;;
|
||||
|
||||
freebsd*)
|
||||
case "$version_type" in
|
||||
freebsd-elf*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
||||
;;
|
||||
*)
|
||||
case "$LD" in
|
||||
*-32|*"-32 ") libmagic=32-bit;;
|
||||
*-n32|*"-n32 ") libmagic=N32;;
|
||||
*-64|*"-64 ") libmagic=64-bit;;
|
||||
*) libmagic=never-match;;
|
||||
esac
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
|
||||
;;
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux-gnu*)
|
||||
case "$host_cpu" in
|
||||
alpha* | i*86 | sparc* )
|
||||
lt_cv_deplibs_check_method=pass_all ;;
|
||||
*)
|
||||
# glibc up to 2.1.1 does not perform some relocations on ARM
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
osf3* | osf4* | osf5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
lt_cv_file_magic_test_file=/lib/libc.so
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
case "$host_vendor" in
|
||||
ncr)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
motorola)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
])
|
||||
file_magic_cmd=$lt_cv_file_magic_cmd
|
||||
deplibs_check_method=$lt_cv_deplibs_check_method
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_CXX - enable support for C++ libraries
|
||||
AC_DEFUN(AC_LIBTOOL_CXX,
|
||||
[AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_REQUIRE([AC_PROG_LIBTOOL])
|
||||
lt_save_CC="$CC"
|
||||
lt_save_CFLAGS="$CFLAGS"
|
||||
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
||||
dnl is set to the C++ compiler.
|
||||
AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" \
|
||||
deplibs_check_method="$deplibs_check_method" \
|
||||
file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
||||
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh \
|
||||
|| AC_MSG_ERROR([libtool tag configuration failed])
|
||||
CC="$lt_save_CC"
|
||||
CFLAGS="$lt_save_CFLAGS"
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
2858
tagdemo/configure
vendored
2858
tagdemo/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,72 +0,0 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
dnl
|
||||
dnl An autoconf script to automatically configure the sample C++ "foo"
|
||||
dnl application.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
|
||||
|
||||
AC_INIT(foo.cpp)dnl
|
||||
|
||||
dnl Check what platform we are running on.
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
dnl Cause GNU Automake to initialize the state of things and run
|
||||
dnl some sanity checks
|
||||
PACKAGE=foo
|
||||
VERSION=0.1
|
||||
|
||||
AM_INIT_AUTOMAKE("$PACKAGE", "$VERSION", DUMMY)dnl
|
||||
|
||||
dnl Check the C compiler and preprocessor.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC_C_O
|
||||
|
||||
dnl Check the C++ compiler and preprocessor.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
dnl Set the test language to C++.
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
# As of the writing of this demo, GNU Autoconf's AC_OBJEXT and
|
||||
# AC_EXEEXT macros only works for C compilers!
|
||||
# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting
|
||||
# the test language to C. We do it before any libtool setup macros are
|
||||
# called so that the proper values are cached beforehand. We also do
|
||||
# it before any linker flags (LDFLAGS) are set so that C++ specific
|
||||
# ones don't break the tests.
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_OBJEXT
|
||||
AC_EXEEXT
|
||||
AC_LANG_RESTORE
|
||||
|
||||
dnl Setup Libtool
|
||||
|
||||
dnl Check for libtool and turn on Automake processing for Libtool
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl Enable C++ support in libtool
|
||||
dnl This causes a C++ configuration tag to be appended to the libtool
|
||||
dnl script generated during the above AC_PROG_LIBTOOL macro execution.
|
||||
AC_LIBTOOL_CXX
|
||||
|
||||
dnl FIXME: We need a better place to add the libtool "tag" flag.
|
||||
dnl This is a really ugly hack.
|
||||
LIBTOOL="$LIBTOOL --tag=CXX"
|
||||
|
||||
AC_CHECK_HEADERS(math.h)
|
||||
|
||||
AC_CHECK_LIBM
|
||||
AC_SUBST(LIBM)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
],
|
||||
[
|
||||
echo "Done configuring package $PACKAGE"
|
||||
])
|
@ -1,59 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
// foo.cpp -- trivial test library
|
||||
// Copyright (C) 1998-2000 Free Software Foundation, Inc.
|
||||
// Originally by Thomas Tanner <tanner@ffii.org>
|
||||
// This file is part of GNU Libtool.
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
|
||||
#include "foo.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_MATH_H
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
// Our C functions.
|
||||
int
|
||||
foo(void)
|
||||
{
|
||||
printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
|
||||
return FOO_RET;
|
||||
}
|
||||
|
||||
int
|
||||
hello(void)
|
||||
{
|
||||
printf ("** This is libfoo (tagdemo) **\n");
|
||||
return HELLO_RET;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// Our C++ derived class methods.
|
||||
|
||||
|
||||
int
|
||||
foobar_derived::foo(void)
|
||||
{
|
||||
return ::foo();
|
||||
}
|
||||
|
||||
int
|
||||
foobar_derived::hello(void)
|
||||
{
|
||||
return ::hello();
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
// foo.h -- interface to the libfoo* libraries
|
||||
// Copyright (C) 1998-1999 Free Software Foundation, Inc.
|
||||
// Originally by Thomas Tanner <tanner@ffii.org>
|
||||
// This file is part of GNU Libtool.
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
|
||||
// Only include this header file once.
|
||||
#ifndef _FOO_H_
|
||||
#define _FOO_H_ 1
|
||||
|
||||
// Silly constants that the functions return.
|
||||
#define HELLO_RET 0xe110
|
||||
#define FOO_RET 0xf00
|
||||
|
||||
// Our C test functions.
|
||||
extern "C"
|
||||
{
|
||||
int foo(void);
|
||||
int hello(void);
|
||||
}
|
||||
|
||||
// Our test C++ base class.
|
||||
class foobar
|
||||
{
|
||||
public:
|
||||
virtual int foo(void) = 0;
|
||||
virtual int hello(void) = 0;
|
||||
// Some dummy pure virtual functions.
|
||||
};
|
||||
|
||||
|
||||
// Our test C++ derived class.
|
||||
class foobar_derived : public foobar
|
||||
{
|
||||
public:
|
||||
virtual int foo(void);
|
||||
virtual int hello(void);
|
||||
// Override the base class' pure virtual functions.
|
||||
};
|
||||
|
||||
#endif /* !_FOO_H_ */
|
@ -1,48 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
// main.cpp -- tagdemo test program
|
||||
// Copyright (C) 1998-2000 Free Software Foundation, Inc.
|
||||
// Originally by Thomas Tanner <tanner@ffii.org>
|
||||
// This file is part of GNU Libtool.
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
|
||||
|
||||
#include "foo.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int
|
||||
main (int, char *[])
|
||||
{
|
||||
printf ("Welcome to GNU libtool tagdemo!\n");
|
||||
|
||||
foobar_derived FB;
|
||||
// Instantiate the derived class.
|
||||
|
||||
foobar *fb = &FB;
|
||||
// Have some fun with polymorphism.
|
||||
|
||||
int value = fb->hello();
|
||||
|
||||
printf ("foobar::hello returned: %i\n", value);
|
||||
if (value == HELLO_RET)
|
||||
printf("foobar::hello is ok!\n");
|
||||
|
||||
if (fb->foo() == FOO_RET)
|
||||
printf("foobar::foo is ok!\n");
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user