From: Todd C. Miller Date: Thu, 18 Mar 2010 15:42:12 +0000 (-0400) Subject: Play more nicely with libtool and let it build libreplace (was libmissing) X-Git-Tag: SUDO_1_8_0~793 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba9d2f5bb6c22287ee0c91894fc499c47bc32455;p=sudo Play more nicely with libtool and let it build libreplace (was libmissing) for us. --- diff --git a/compat/Makefile.in b/compat/Makefile.in index 7cc344b2e..beceb6cbe 100644 --- a/compat/Makefile.in +++ b/compat/Makefile.in @@ -48,48 +48,39 @@ SHELL = /bin/sh LIBOBJDIR = $(top_srcdir)/@ac_config_libobj_dir@/ -LIBOBJS = @LIBOBJS@ - LTLIBOBJS = @LTLIBOBJS@ -all: libmissing.a libmissing_pic.a +all: libreplace.la .SUFFIXES: .o .c .h .lo -.c.o: - $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $< - .c.lo: $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $< -libmissing.a: $(LIBOBJS) - $(AR) rv $@ $(LIBOBJS) - $(RANLIB) $@ - -libmissing_pic.a: $(LTLIBOBJS) - $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) +libreplace.la: $(LTLIBOBJS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install # Dependencies -$(LIBOBJDIR)$(LIBOBJDIR)closefrom.lo $(LIBOBJDIR)closefrom.o: $(compat)/closefrom.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)fnmatch.lo $(LIBOBJDIR)fnmatch.o: $(compat)/fnmatch.c $(compat)/fnmatch.h $(compat)/charclass.h $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)getcwd.lo $(LIBOBJDIR)getcwd.o: $(compat)/getcwd.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)getline.lo $(LIBOBJDIR)getline.o: $(compat)/getline.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)getprogname.lo $(LIBOBJDIR)getprogname.o: $(compat)/getprogname.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)glob.lo $(LIBOBJDIR)glob.o: $(compat)/glob.c $(compat)/glob.h $(compat)/charclass.h $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)isblank.lo $(LIBOBJDIR)isblank.o: $(compat)/isblank.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)memrchr.lo $(LIBOBJDIR)memrchr.o: $(compat)/memrchr.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)mkstemp.lo $(LIBOBJDIR)mkstemp.o: $(compat)/mkstemp.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)nanosleep.lo $(LIBOBJDIR)nanosleep.o: $(compat)/nanosleep.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)sigaction.lo $(LIBOBJDIR)sigaction.o: $(compat)/sigaction.c $(incdir)/compat.h $(incdir)/compat.h -$(LIBOBJDIR)$(LIBOBJDIR)snprintf.lo $(LIBOBJDIR)snprintf.o: $(compat)/snprintf.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strcasecmp.lo $(LIBOBJDIR)strcasecmp.o: $(compat)/strcasecmp.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strdup.lo $(LIBOBJDIR)strdup.o: $(compat)/strdup.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strndup.lo $(LIBOBJDIR)strndup.o: $(compat)/strdup.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strerror.lo $(LIBOBJDIR)strerror.o: $(compat)/strerror.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strlcat.lo $(LIBOBJDIR)strlcat.o: $(compat)/strlcat.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strlcpy.lo $(LIBOBJDIR)strlcpy.o: $(compat)/strlcpy.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)strsignal.lo $(LIBOBJDIR)strsignal.o: $(compat)/strsignal.c $(incdir)/compat.h $(top_builddir)/config.h -$(LIBOBJDIR)$(LIBOBJDIR)utimes.lo $(LIBOBJDIR)utimes.o: $(compat)/utimes.c $(incdir)/compat.h $(compat)/utime.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)closefrom.lo: $(compat)/closefrom.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)fnmatch.lo: $(compat)/fnmatch.c $(compat)/fnmatch.h $(compat)/charclass.h $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)getcwd.lo: $(compat)/getcwd.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)getline.lo: $(compat)/getline.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)getprogname.lo: $(compat)/getprogname.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)glob.lo: $(compat)/glob.c $(compat)/glob.h $(compat)/charclass.h $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)isblank.lo: $(compat)/isblank.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)memrchr.lo: $(compat)/memrchr.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)mkstemp.lo: $(compat)/mkstemp.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)nanosleep.lo: $(compat)/nanosleep.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)sigaction.lo: $(compat)/sigaction.c $(incdir)/compat.h $(incdir)/compat.h +$(LIBOBJDIR)$(LIBOBJDIR)snprintf.lo: $(compat)/snprintf.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strcasecmp.lo: $(compat)/strcasecmp.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strdup.lo: $(compat)/strdup.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strndup.lo: $(compat)/strdup.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strerror.lo: $(compat)/strerror.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strlcat.lo: $(compat)/strlcat.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strlcpy.lo: $(compat)/strlcpy.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)strsignal.lo: $(compat)/strsignal.c $(incdir)/compat.h $(top_builddir)/config.h +$(LIBOBJDIR)$(LIBOBJDIR)utimes.lo: $(compat)/utimes.c $(incdir)/compat.h $(compat)/utime.h $(top_builddir)/config.h install: diff --git a/configure b/configure index edb414de6..7db87b307 100755 --- a/configure +++ b/configure @@ -1509,8 +1509,8 @@ Optional Features: --enable-zlib=PATH Whether to enable or disable zlib --enable-gss-krb5-ccache-name Use GSS-API to set the Kerberos V cred cache name - --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) @@ -5882,54 +5882,53 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; + yes) enable_shared=yes ;; + no) enable_shared=no ;; *) - enable_static=no + enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then - enable_static=yes + enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else - enable_static=no + enable_shared=yes fi - - - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; + yes) enable_static=yes ;; + no) enable_static=no ;; *) - enable_shared=no + enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then - enable_shared=yes + enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else - enable_shared=yes + enable_static=yes fi @@ -6609,7 +6608,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6612 "configure"' > conftest.$ac_ext + echo '#line 6611 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8473,11 +8472,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8476: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8475: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8480: \$? = $ac_status" >&5 + echo "$as_me:8479: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8763,11 +8762,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8766: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8765: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8770: \$? = $ac_status" >&5 + echo "$as_me:8769: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8867,11 +8866,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8870: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8869: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8874: \$? = $ac_status" >&5 + echo "$as_me:8873: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11227,7 +11226,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <