- [Daniel Johnson] I've been trying to build libcurl with clang on Darwin and

ran into some issues with the GSSAPI tests in configure.ac. The tests first
  try to determine the include dirs and libs and set CPPFLAGS and LIBS
  accordingly. It then checks for the headers and finally sets LIBS a second
  time, causing the libs to be included twice. The first setting of LIBS seems
  redundant and should be left out, since the first part is otherwise just
  about finding headers.

  My second issue is that 'krb5-config --libs gssapi' on Darwin is less than
  useless and returns junk that, while it happens to work with gcc, causes
  clang to choke. For example, --libs returns $CFLAGS along with the libs,
  which is really retarded. Simply setting 'LIBS="$LIBS -lgssapi_krb5
  -lresolv"' on Darwin is sufficient.
This commit is contained in:
Daniel Stenberg 2010-03-02 22:02:56 +00:00
Родитель 9b2cce236f
Коммит 013d5a72d4
3 изменённых файлов: 34 добавлений и 15 удалений

14
CHANGES
Просмотреть файл

@ -7,6 +7,20 @@
Changelog Changelog
Daniel Stenberg (2 Mar 2010) Daniel Stenberg (2 Mar 2010)
- [Daniel Johnson] I've been trying to build libcurl with clang on Darwin and
ran into some issues with the GSSAPI tests in configure.ac. The tests first
try to determine the include dirs and libs and set CPPFLAGS and LIBS
accordingly. It then checks for the headers and finally sets LIBS a second
time, causing the libs to be included twice. The first setting of LIBS seems
redundant and should be left out, since the first part is otherwise just
about finding headers.
My second issue is that 'krb5-config --libs gssapi' on Darwin is less than
useless and returns junk that, while it happens to work with gcc, causes
clang to choke. For example, --libs returns $CFLAGS along with the libs,
which is really retarded. Simply setting 'LIBS="$LIBS -lgssapi_krb5
-lresolv"' on Darwin is sufficient.
- Based on patch provided by Jacob Moshenko, the transfer logic now properly - Based on patch provided by Jacob Moshenko, the transfer logic now properly
makes sure that when using sub-second timeouts, there's no final bad 1000ms makes sure that when using sub-second timeouts, there's no final bad 1000ms
wait. Previously, a sub-second timeout would often make the elapsed time end wait. Previously, a sub-second timeout would often make the elapsed time end

Просмотреть файл

@ -27,6 +27,7 @@ This release includes the following bugfixes:
o skip poll() on Interix o skip poll() on Interix
o CURLOPT_CERTINFO memory leak o CURLOPT_CERTINFO memory leak
o sub-second timeouts improvements o sub-second timeouts improvements
o configure fixes for GSSAPI
This release includes the following known bugs: This release includes the following known bugs:
@ -37,6 +38,6 @@ advice from friends like these:
Steven M. Schweda, Yang Tse, Jack Zhang, Tom Donovan, Martin Hager, Steven M. Schweda, Yang Tse, Jack Zhang, Tom Donovan, Martin Hager,
Daniel Fandrich, Patrick Monnerat, Pat Ray, Wesley Miaw, Ben Greear, Daniel Fandrich, Patrick Monnerat, Pat Ray, Wesley Miaw, Ben Greear,
Ryan Chan, Markus Duft, Andrei Benea, Jacob Moshenko Ryan Chan, Markus Duft, Andrei Benea, Jacob Moshenko, Daniel Johnson
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)

Просмотреть файл

@ -1123,15 +1123,12 @@ if test x"$want_gss" = xyes; then
if test -z "$GSSAPI_INCS"; then if test -z "$GSSAPI_INCS"; then
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
GSSAPI_LIBS=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include" GSSAPI_INCS="-I$GSSAPI_ROOT/include"
GSSAPI_LIBS="-lgssapi"
fi fi
fi fi
CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
LIBS="$LIBS $GSSAPI_LIBS"
AC_CHECK_HEADER(gss.h, AC_CHECK_HEADER(gss.h,
[ [
@ -1198,17 +1195,24 @@ if test x"$want_gss" = xyes; then
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
LIBS="$LIBS -lgss" LIBS="$LIBS -lgss"
elif test -z "$GSSAPI_LIB_DIR"; then elif test -z "$GSSAPI_LIB_DIR"; then
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then case $host in
dnl krb5-config doesn't have --libs-only-L or similar, put everything *-*-darwin*)
dnl into LIBS LIBS="$LIBS -lgssapi_krb5 -lresolv"
gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` ;;
LIBS="$LIBS $gss_libs" *)
elif test "$GSSAPI_ROOT" != "yes"; then if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" dnl krb5-config doesn't have --libs-only-L or similar, put everything
LIBS="$LIBS -lgssapi" dnl into LIBS
else gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
LIBS="$LIBS -lgssapi" LIBS="$LIBS $gss_libs"
fi elif test "$GSSAPI_ROOT" != "yes"; then
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
LIBS="$LIBS -lgssapi"
else
LIBS="$LIBS -lgssapi"
fi
;;
esac
else else
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
LIBS="$LIBS -lgssapi" LIBS="$LIBS -lgssapi"