From: Ezra Peisach Date: Mon, 13 Jan 2003 23:00:58 +0000 (+0000) Subject: * Makefile.in (check-unix): Test to see if krb5-config outputs X-Git-Tag: krb5-1.3-alpha1~157 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a990fe2db2e471d5e9e60a7171813809f8e22a72;p=krb5.git * Makefile.in (check-unix): Test to see if krb5-config outputs variables that require Makefile substitutions. * krb5-config.in: Remore $(PURE) from output. Handle variables $(RPATH_FLAG) and $(LDFLAGS). If config/shlib.conf is changed again, we will detect brokeness in krb5-config before the release. ticket: 1311 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15120 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 3a579def4..0c330861d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2003-01-13 Ezra Peisach + + * Makefile.in (check-unix): Test to see if krb5-config outputs + variables that require Makefile substitutions. + + * krb5-config.in: Remore $(PURE) from output. Handle variables + $(RPATH_FLAG) and $(LDFLAGS). + 2003-01-10 Ken Raeburn * aclocal.m4 (KRB5_BUILD_LIBRARY_WITH_DEPS): Require diff --git a/src/Makefile.in b/src/Makefile.in index 3e26037e2..284986a54 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -568,3 +568,16 @@ install-unix:: krb5-config: $(srcdir)/krb5-config.in $(thisconfigdir)/config.status cd $(thisconfigdir) && $(SHELL) config.status krb5-config +# Test to ensure that krb5-config does not spit out things like +# $(PURE) or $(LDFLAGS) in case someone changes config/shlib.conf +check-unix:: krb5-config + @echo "Testing if krb5-config outputs shell variables" + @if `./krb5-config --libs kdb | egrep -s '\\$$'`; then \ + echo "Error './krb5-config --libs kdb' contains shell variables"; \ + exit 1; \ + fi + @if `./krb5-config --cflags | egrep -s '\\$$'`; then \ + echo "Error './krb5-config --cflags' contains shell variables"; \ + exit 1; \ + fi + @echo "krb5-config appears ok" diff --git a/src/krb5-config.in b/src/krb5-config.in index e5fec5870..3aa01ad74 100644 --- a/src/krb5-config.in +++ b/src/krb5-config.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2001 by the Massachusetts Institute of Technology. +# Copyright 2001, 2002, 2003 by the Massachusetts Institute of Technology. # All Rights Reserved. # # Export of this software from the United States of America may @@ -34,7 +34,8 @@ libdir=@libdir@ CC_LINK='@CC_LINK@' KRB4_LIB=@KRB4_LIB@ DES425_LIB=@DES425_LIB@ - +LDFLAGS='@LDFLAGS@' +RPATH_FLAG='@RPATH_FLAG@' LIBS='@LIBS@' GEN_LIB=@GEN_LIB@ @@ -170,8 +171,11 @@ fi if test -n "$do_libs"; then # Ugly gross hack for our build tree lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \ + -e 's/\$(PURE)//' \ -e 's#\$(PROG_RPATH)#'$libdir'#' \ - -e 's#\$(PROG_LIBPATH)#-L'$libdir'#'` + -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \ + -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \ + -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#'` if test $library = 'kdb'; then lib_flags="$lib_flags -lkdb5 -ldb" @@ -204,7 +208,7 @@ if test -n "$do_libs"; then fi if test $library = 'krb5'; then - lib_flags="$lib_flags -lkrb5 -lk5crypto -lcom_err $GEN_LIB" + lib_flags="$lib_flags -lkrb5 -lk5crypto -lcom_err $LIBS $GEN_LIB" fi echo $lib_flags