diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 53c8b1e3b..5cb20f47c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1830,81 +1830,6 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], ]) dnl end of AC_DEFUN() - -dnl Determine the name of the library to pass to dlopen() based on the name -dnl that would normally be given to AC_CHECK_LIB. The preprocessor symbol -dnl given is set to the quoted library file name. -dnl The standard dynamic library file name is first generated, based on the -dnl current system type, then a search is performed for that file on the -dnl standard dynamic library path. If it is a symbolic link, the destination -dnl of the link is used as the file name, after stripping off any minor -dnl version numbers. If a library file can't be found, a guess is made. -dnl This macro assumes AC_PROG_LIBTOOL has been called and requires perl -dnl to be available in the PATH, or $PERL to be set to its location. -dnl -dnl CURL_DLLIB_NAME(VARIABLE, library_name) -dnl e.g. CURL_DLLIB_NAME(LDAP_NAME, ldap) on a Linux system might result -dnl in LDAP_NAME holding the string "libldap.so.2". - -AC_DEFUN([CURL_DLLIB_NAME], -[ -AC_MSG_CHECKING([name of dynamic library $2]) -dnl The shared library extension variable name changes from version to -dnl version of libtool. Try a few names then just set one statically. -test -z "$shared_ext" && eval shared_ext=\"$shrext_cmds\" -test -z "$shared_ext" && shared_ext="$std_shrext" -test -z "$shared_ext" && shared_ext="$shrext" -test -z "$shared_ext" && shared_ext=".so" - -dnl Create the library link name of the correct form for this platform -LIBNAME_LINK_SPEC=`echo "$library_names_spec" | $SED 's/^.* //'` -DLGUESSLIB=`name=$2 eval echo "$libname_spec"` -DLGUESSFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$LIBNAME_LINK_SPEC"` -dnl Last resort in case libtool knows nothing about shared libs on this platform -test -z "$DLGUESSFILE" && DLGUESSFILE="$DLGUESSLIB$shared_ext" - -dnl Synthesize a likely dynamic library name in case we can't find an actual one -SO_NAME_SPEC="$soname_spec" -dnl soname_spec undefined when identical to the 1st entry in library_names_spec -test -z "$SO_NAME_SPEC" && SO_NAME_SPEC=`echo "$library_names_spec" | $SED 's/ .*$//'` -DLGUESSSOFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$SO_NAME_SPEC"` -dnl Last resort in case libtool knows nothing about shared libs on this platform -test -z "$DLGUESSSOFILE" && DLGUESSSOFILE="$DLGUESSFILE" - -if test "$cross_compiling" = yes; then - dnl Can't look at filesystem when cross-compiling - AC_DEFINE_UNQUOTED($1, "$DLGUESSSOFILE", [$2 dynamic library file]) - AC_MSG_RESULT([$DLGUESSSOFILE (guess while cross-compiling)]) -else - - DLFOUNDFILE="" - if test "$sys_lib_dlsearch_path_spec" ; then - dnl Search for the link library name and see what it points to. - for direc in $sys_lib_dlsearch_path_spec ; do - DLTRYFILE="$direc/$DLGUESSFILE" - dnl Find where the symbolic link for this name points - changequote(<<, >>)dnl - << - DLFOUNDFILE=`${PERL:-perl} -e 'use File::Basename; (basename(readlink($ARGV[0])) =~ /^(.*[^\d]\.\d+)[\d\.]*$/ && print ${1}) || exit 1;' "$DLTRYFILE" 2>&5` - >> - changequote([, ])dnl - if test "$?" -eq "0"; then - dnl Found the file link - break - fi - done - fi - - if test -z "$DLFOUNDFILE" ; then - dnl Couldn't find a link library, so guess at a name. - DLFOUNDFILE="$DLGUESSSOFILE" - fi - - AC_DEFINE_UNQUOTED($1, "$DLFOUNDFILE", [$2 dynamic library file]) - AC_MSG_RESULT($DLFOUNDFILE) -fi -]) - # This is only a temporary fix. This macro is here to replace the broken one # delivered by the automake project (including the 1.9.6 release). As soon as # they ship a working version we SHOULD remove this work-around. |