| #! /bin/sh |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| libext=a |
| shrext=.so |
| |
| host="$1" |
| host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
| host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
| host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
| |
| |
| |
| wl= |
| if test "$GCC" = yes; then |
| wl='-Wl,' |
| else |
| case "$host_os" in |
| aix*) |
| wl='-Wl,' |
| ;; |
| mingw* | pw32* | os2*) |
| ;; |
| hpux9* | hpux10* | hpux11*) |
| wl='-Wl,' |
| ;; |
| irix5* | irix6* | nonstopux*) |
| wl='-Wl,' |
| ;; |
| newsos6) |
| ;; |
| linux*) |
| case $CC in |
| icc|ecc) |
| wl='-Wl,' |
| ;; |
| ccc) |
| wl='-Wl,' |
| ;; |
| esac |
| ;; |
| osf3* | osf4* | osf5*) |
| wl='-Wl,' |
| ;; |
| sco3.2v5*) |
| ;; |
| solaris*) |
| wl='-Wl,' |
| ;; |
| sunos4*) |
| wl='-Qoption ld ' |
| ;; |
| sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| wl='-Wl,' |
| ;; |
| sysv4*MP*) |
| ;; |
| uts4*) |
| ;; |
| esac |
| fi |
| |
| |
| |
| hardcode_libdir_flag_spec= |
| hardcode_libdir_separator= |
| hardcode_direct=no |
| hardcode_minus_L=no |
| |
| case "$host_os" in |
| cygwin* | mingw* | pw32*) |
| |
| |
| |
| if test "$GCC" != yes; then |
| with_gnu_ld=no |
| fi |
| ;; |
| openbsd*) |
| with_gnu_ld=no |
| ;; |
| esac |
| |
| ld_shlibs=yes |
| if test "$with_gnu_ld" = yes; then |
| case "$host_os" in |
| aix3* | aix4* | aix5*) |
| |
| if test "$host_cpu" != ia64; then |
| ld_shlibs=no |
| fi |
| ;; |
| amigaos*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_minus_L=yes |
| |
| |
| |
| |
| |
| |
| ld_shlibs=no |
| ;; |
| beos*) |
| if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| : |
| else |
| ld_shlibs=no |
| fi |
| ;; |
| cygwin* | mingw* | pw32*) |
| |
| |
| hardcode_libdir_flag_spec='-L$libdir' |
| if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
| : |
| else |
| ld_shlibs=no |
| fi |
| ;; |
| netbsd*) |
| ;; |
| solaris* | sysv5*) |
| if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then |
| ld_shlibs=no |
| elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| : |
| else |
| ld_shlibs=no |
| fi |
| ;; |
| sunos4*) |
| hardcode_direct=yes |
| ;; |
| *) |
| if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| : |
| else |
| ld_shlibs=no |
| fi |
| ;; |
| esac |
| if test "$ld_shlibs" = yes; then |
| |
| |
| hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| fi |
| else |
| case "$host_os" in |
| aix3*) |
| |
| |
| hardcode_minus_L=yes |
| if test "$GCC" = yes; then |
| |
| |
| hardcode_direct=unsupported |
| fi |
| ;; |
| aix4* | aix5*) |
| if test "$host_cpu" = ia64; then |
| |
| |
| aix_use_runtimelinking=no |
| else |
| aix_use_runtimelinking=no |
| |
| |
| |
| case $host_os in aix4.[23]|aix4.[23].*|aix5*) |
| for ld_flag in $LDFLAGS; do |
| if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
| aix_use_runtimelinking=yes |
| break |
| fi |
| done |
| esac |
| fi |
| hardcode_direct=yes |
| hardcode_libdir_separator=':' |
| if test "$GCC" = yes; then |
| case $host_os in aix4.[012]|aix4.[012].*) |
| collect2name=`${CC} -print-prog-name=collect2` |
| if test -f "$collect2name" && \ |
| strings "$collect2name" | grep resolve_lib_name >/dev/null |
| then |
| |
| hardcode_direct=yes |
| else |
| |
| hardcode_direct=unsupported |
| hardcode_minus_L=yes |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_libdir_separator= |
| fi |
| esac |
| fi |
| |
| echo 'int main () { return 0; }' > conftest.c |
| ${CC} ${LDFLAGS} conftest.c -o conftest |
| aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
| }'` |
| if test -z "$aix_libpath"; then |
| aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
| }'` |
| fi |
| if test -z "$aix_libpath"; then |
| aix_libpath="/usr/lib:/lib" |
| fi |
| rm -f conftest.c conftest |
| |
| if test "$aix_use_runtimelinking" = yes; then |
| hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
| else |
| if test "$host_cpu" = ia64; then |
| hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
| else |
| hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
| fi |
| fi |
| ;; |
| amigaos*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_minus_L=yes |
| |
| ld_shlibs=no |
| ;; |
| bsdi4*) |
| ;; |
| cygwin* | mingw* | pw32*) |
| |
| |
| |
| |
| hardcode_libdir_flag_spec=' ' |
| libext=lib |
| ;; |
| darwin* | rhapsody*) |
| if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then |
| hardcode_direct=no |
| fi |
| ;; |
| dgux*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| ;; |
| freebsd1*) |
| ld_shlibs=no |
| ;; |
| freebsd2.2*) |
| hardcode_libdir_flag_spec='-R$libdir' |
| hardcode_direct=yes |
| ;; |
| freebsd2*) |
| hardcode_direct=yes |
| hardcode_minus_L=yes |
| ;; |
| freebsd*) |
| hardcode_libdir_flag_spec='-R$libdir' |
| hardcode_direct=yes |
| ;; |
| hpux9*) |
| hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| hardcode_libdir_separator=: |
| hardcode_direct=yes |
| |
| |
| hardcode_minus_L=yes |
| ;; |
| hpux10* | hpux11*) |
| if test "$with_gnu_ld" = no; then |
| case "$host_cpu" in |
| hppa*64*) |
| hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| hardcode_libdir_separator=: |
| hardcode_direct=no |
| ;; |
| ia64*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_direct=no |
| |
| |
| hardcode_minus_L=yes |
| ;; |
| *) |
| hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| hardcode_libdir_separator=: |
| hardcode_direct=yes |
| |
| |
| hardcode_minus_L=yes |
| ;; |
| esac |
| fi |
| ;; |
| irix5* | irix6* | nonstopux*) |
| hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| hardcode_libdir_separator=: |
| ;; |
| netbsd*) |
| hardcode_libdir_flag_spec='-R$libdir' |
| hardcode_direct=yes |
| ;; |
| newsos6) |
| hardcode_direct=yes |
| hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| hardcode_libdir_separator=: |
| ;; |
| openbsd*) |
| hardcode_direct=yes |
| if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| else |
| case "$host_os" in |
| openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) |
| hardcode_libdir_flag_spec='-R$libdir' |
| ;; |
| *) |
| hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| ;; |
| esac |
| fi |
| ;; |
| os2*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_minus_L=yes |
| ;; |
| osf3*) |
| hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| hardcode_libdir_separator=: |
| ;; |
| osf4* | osf5*) |
| if test "$GCC" = yes; then |
| hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| else |
| |
| hardcode_libdir_flag_spec='-rpath $libdir' |
| fi |
| hardcode_libdir_separator=: |
| ;; |
| sco3.2v5*) |
| ;; |
| solaris*) |
| hardcode_libdir_flag_spec='-R$libdir' |
| ;; |
| sunos4*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| hardcode_direct=yes |
| hardcode_minus_L=yes |
| ;; |
| sysv4) |
| case $host_vendor in |
| sni) |
| hardcode_direct=yes |
| ;; |
| siemens) |
| hardcode_direct=no |
| ;; |
| motorola) |
| hardcode_direct=no |
| ;; |
| esac |
| ;; |
| sysv4.3*) |
| ;; |
| sysv4*MP*) |
| if test -d /usr/nec; then |
| ld_shlibs=yes |
| fi |
| ;; |
| sysv4.2uw2*) |
| hardcode_direct=yes |
| hardcode_minus_L=no |
| ;; |
| sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) |
| ;; |
| sysv5*) |
| hardcode_libdir_flag_spec= |
| ;; |
| uts4*) |
| hardcode_libdir_flag_spec='-L$libdir' |
| ;; |
| *) |
| ld_shlibs=no |
| ;; |
| esac |
| fi |
| |
| |
| |
| libname_spec='lib$name' |
| case "$host_os" in |
| aix3*) |
| ;; |
| aix4* | aix5*) |
| ;; |
| amigaos*) |
| ;; |
| beos*) |
| ;; |
| bsdi4*) |
| ;; |
| cygwin* | mingw* | pw32*) |
| shrext=.dll |
| ;; |
| darwin* | rhapsody*) |
| shrext=.dylib |
| ;; |
| dgux*) |
| ;; |
| freebsd1*) |
| ;; |
| freebsd*) |
| ;; |
| gnu*) |
| ;; |
| hpux9* | hpux10* | hpux11*) |
| case "$host_cpu" in |
| ia64*) |
| shrext=.so |
| ;; |
| hppa*64*) |
| shrext=.sl |
| ;; |
| *) |
| shrext=.sl |
| ;; |
| esac |
| ;; |
| irix5* | irix6* | nonstopux*) |
| case "$host_os" in |
| irix5* | nonstopux*) |
| libsuff= shlibsuff= |
| ;; |
| *) |
| case $LD in |
| *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; |
| *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; |
| *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; |
| *) libsuff= shlibsuff= ;; |
| esac |
| ;; |
| esac |
| ;; |
| linux*oldld* | linux*aout* | linux*coff*) |
| ;; |
| linux*) |
| ;; |
| netbsd*) |
| ;; |
| newsos6) |
| ;; |
| nto-qnx) |
| ;; |
| openbsd*) |
| ;; |
| os2*) |
| libname_spec='$name' |
| shrext=.dll |
| ;; |
| osf3* | osf4* | osf5*) |
| ;; |
| sco3.2v5*) |
| ;; |
| solaris*) |
| ;; |
| sunos4*) |
| ;; |
| sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| ;; |
| sysv4*MP*) |
| ;; |
| uts4*) |
| ;; |
| esac |
| |
| sed_quote_subst='s/\(["`$\\]\)/\\\1/g' |
| escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` |
| shlibext=`echo "$shrext" | sed -e 's,^\.,,'` |
| escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` |
| |
| sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF |
| |
| |
| wl="$escaped_wl" |
| |
| |
| libext="$libext" |
| |
| |
| shlibext="$shlibext" |
| |
| |
| |
| hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" |
| |
| |
| hardcode_libdir_separator="$hardcode_libdir_separator" |
| |
| |
| |
| hardcode_direct="$hardcode_direct" |
| |
| |
| |
| hardcode_minus_L="$hardcode_minus_L" |
| |
| EOF |