Fixed dll check for cygwin.
This commit is contained in:
parent
ab5bba62f9
commit
466ae143ee
|
@ -9461,6 +9461,51 @@ LDSHARED=""
|
|||
LDDLLFLAGS=""
|
||||
if test "$LIBEXT" = "so"
|
||||
then
|
||||
case $target_os in
|
||||
*cygwin*)
|
||||
# Extract the first word of "dllwrap", so it can be a program name with args.
|
||||
set dummy dllwrap; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_DLLWRAP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$DLLWRAP"; then
|
||||
ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_DLLWRAP="dllwrap"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
test -z "$ac_cv_prog_DLLWRAP" && ac_cv_prog_DLLWRAP="false"
|
||||
fi
|
||||
fi
|
||||
DLLWRAP=$ac_cv_prog_DLLWRAP
|
||||
if test -n "$DLLWRAP"; then
|
||||
echo "$as_me:$LINENO: result: $DLLWRAP" >&5
|
||||
echo "${ECHO_T}$DLLWRAP" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
if test "$DLLWRAP" = "dllwrap"; then
|
||||
LIBEXT="dll"
|
||||
else
|
||||
LIBEXT="a"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "$as_me:$LINENO: checking whether we can build a GNU style ELF dll" >&5
|
||||
echo $ECHO_N "checking whether we can build a GNU style ELF dll... $ECHO_C" >&6
|
||||
if test "${ac_cv_c_dll_gnuelf+set}" = set; then
|
||||
|
@ -9570,53 +9615,8 @@ echo "${ECHO_T}$ac_cv_c_dll_unixware" >&6
|
|||
LDDLLFLAGS="-Wl,-B,symbolic"
|
||||
fi
|
||||
fi
|
||||
if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
|
||||
then
|
||||
LIBEXT="a"
|
||||
# Extract the first word of "dllwrap", so it can be a program name with args.
|
||||
set dummy dllwrap; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_DLLWRAP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$DLLWRAP"; then
|
||||
ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_DLLWRAP="dllwrap"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
test -z "$ac_cv_prog_DLLWRAP" && ac_cv_prog_DLLWRAP="false"
|
||||
fi
|
||||
fi
|
||||
DLLWRAP=$ac_cv_prog_DLLWRAP
|
||||
if test -n "$DLLWRAP"; then
|
||||
echo "$as_me:$LINENO: result: $DLLWRAP" >&5
|
||||
echo "${ECHO_T}$DLLWRAP" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
if test "$DLLWRAP" = "dllwrap"; then
|
||||
case $host_os in
|
||||
*cygwin*)
|
||||
LIBEXT="dll"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$LIBEXT" = "a"; then
|
||||
|
|
25
configure.ac
25
configure.ac
|
@ -712,8 +712,18 @@ LDSHARED=""
|
|||
LDDLLFLAGS=""
|
||||
if test "$LIBEXT" = "so"
|
||||
then
|
||||
AC_CACHE_CHECK([whether we can build a GNU style ELF dll],
|
||||
ac_cv_c_dll_gnuelf,
|
||||
case $target_os in
|
||||
*cygwin*)
|
||||
AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
|
||||
if test "$DLLWRAP" = "dllwrap"; then
|
||||
dnl FIXME - check whether dllwrap works correctly...
|
||||
LIBEXT="dll"
|
||||
else
|
||||
LIBEXT="a"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_CACHE_CHECK([whether we can build a GNU style ELF dll],ac_cv_c_dll_gnuelf,
|
||||
[saved_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
|
||||
AC_TRY_LINK(,[return 1],ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")
|
||||
|
@ -737,19 +747,8 @@ then
|
|||
LDDLLFLAGS="-Wl,-B,symbolic"
|
||||
fi
|
||||
fi
|
||||
if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
|
||||
then
|
||||
LIBEXT="a"
|
||||
AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
|
||||
if test "$DLLWRAP" = "dllwrap"; then
|
||||
dnl FIXME - check whether dllwrap works correctly...
|
||||
case $host_os in
|
||||
*cygwin*)
|
||||
LIBEXT="dll"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$LIBEXT" = "a"; then
|
||||
|
|
Loading…
Reference in New Issue