|
|
to link against the .so | to link against the .so |
not resolve symbols in static libs properly. | not resolve symbols in static libs properly. |
|
|
| |
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
ac_save_LIBS="$LIBS" | ac_save_LIBS="$LIBS" |
LIBS="$LIBS $LIB[]NAME" |
dnl $LIBS should be last to resolve symbols when linking static |
|
LIBS="$LIB[]NAME $LIBS" |
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
LIBS="$ac_save_LIBS" | LIBS="$ac_save_LIBS" |
]) | ]) |
|
|
dnl standard /usr/lib. | dnl standard /usr/lib. |
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
dnl No hardcoding is needed. | dnl No hardcoding is needed. |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
else | else |
dnl Use an explicit option to hardcode DIR into the resulting | dnl Use an explicit option to hardcode DIR into the resulting |
dnl binary. | dnl binary. |
|
|
if test "$hardcode_direct" = yes; then | if test "$hardcode_direct" = yes; then |
dnl Using DIR/libNAME.so during linking hardcodes DIR into the | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
dnl resulting binary. | dnl resulting binary. |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
else | else |
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
dnl Use an explicit option to hardcode DIR into the resulting | dnl Use an explicit option to hardcode DIR into the resulting |
dnl binary. | dnl binary. |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
dnl Potentially add DIR to rpathdirs. | dnl Potentially add DIR to rpathdirs. |
dnl The rpathdirs will be appended to $LIBNAME at the end. | dnl The rpathdirs will be appended to $LIBNAME at the end. |
haveit= | haveit= |
|
|
dnl FIXME: Not sure whether we should use | dnl FIXME: Not sure whether we should use |
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
dnl here. | dnl here. |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
else | else |
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
dnl here, because this doesn't fit in flags passed to the | dnl here, because this doesn't fit in flags passed to the |
|
|
CFLAGS = @CFLAGS@ | CFLAGS = @CFLAGS@ |
CPPFLAGS = @CPPFLAGS@ | CPPFLAGS = @CPPFLAGS@ |
DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" | DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" |
LIBS = @LIBS@ @LIBSSL@ |
LIBS = @LIBSSL@ @LIBS@ |
LDFLAGS = @LDFLAGS@ | LDFLAGS = @LDFLAGS@ |
| |
# | # |
|
|
DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" | DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" |
CFLAGS = @CFLAGS@ | CFLAGS = @CFLAGS@ |
LDFLAGS = @LDFLAGS@ | LDFLAGS = @LDFLAGS@ |
LIBS = @LIBS@ @LIBSSL@ |
LIBS = @LIBSSL@ @LIBS@ |
exeext = @exeext@ | exeext = @exeext@ |
| |
INCLUDES = -I. -I$(srcdir) | INCLUDES = -I. -I$(srcdir) |
|
|
LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$found_dir -l$name" | LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$found_dir -l$name" |
if test "X$found_so" != "X"; then | if test "X$found_so" != "X"; then |
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so" |
LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" |
else | else |
haveit= | haveit= |
for x in $ltrpathdirs; do | for x in $ltrpathdirs; do |
|
|
ltrpathdirs="$ltrpathdirs $found_dir" | ltrpathdirs="$ltrpathdirs $found_dir" |
fi | fi |
if test "$hardcode_direct" = yes; then | if test "$hardcode_direct" = yes; then |
LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so" |
LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" |
else | else |
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so" |
LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" |
haveit= | haveit= |
for x in $rpathdirs; do | for x in $rpathdirs; do |
if test "X$x" = "X$found_dir"; then | if test "X$x" = "X$found_dir"; then |
|
|
LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir" | LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir" |
fi | fi |
if test "$hardcode_minus_L" != no; then | if test "$hardcode_minus_L" != no; then |
LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so" |
LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" |
else | else |
LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" | LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name" |
fi | fi |
|
|
else | else |
| |
ac_save_LIBS="$LIBS" | ac_save_LIBS="$LIBS" |
LIBS="$LIBS $LIBSSL" |
LIBS="$LIBSSL $LIBS" |
cat >conftest.$ac_ext <<_ACEOF | cat >conftest.$ac_ext <<_ACEOF |
/* confdefs.h. */ | /* confdefs.h. */ |
_ACEOF | _ACEOF |