From fa3a536011f566d5473dc4aec4aff2d4fc53ac52 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Thu, 9 May 2002 01:49:54 +0000 Subject: [PATCH] There's no need to check for dlopen on cygwin. --- configure | 755 +++++++++++++++++++++++++-------------------------- configure.ac | 55 ++-- 2 files changed, 404 insertions(+), 406 deletions(-) diff --git a/configure b/configure index d18b3c61cd2..816bf65d27e 100755 --- a/configure +++ b/configure @@ -5099,7 +5099,7 @@ _ACEOF fi -DLLIBS="" +JPEGLIB="" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 @@ -5299,269 +5299,6 @@ done -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -for ac_func in dlopen -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN 1 -_ACEOF - - DLLIBS="-ldl" -else - LIBEXT="a" -fi - - -fi -done - -else - LIBEXT="a" - -fi - -done - - -JPEGLIB="" - - for ac_header in jpeglib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -9293,62 +9030,352 @@ if (ac_test) return 1 return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_extern_prefix="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_extern_prefix="no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$saved_libs +fi +echo "$as_me:$LINENO: result: $ac_cv_c_extern_prefix" >&5 +echo "${ECHO_T}$ac_cv_c_extern_prefix" >&6 +if test "$ac_cv_c_extern_prefix" = "yes" +then + +cat >>confdefs.h <<\_ACEOF +#define NEED_UNDERSCORE_PREFIX 1 +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking whether stdcall symbols need to be decorated" >&5 +echo $ECHO_N "checking whether stdcall symbols need to be decorated... $ECHO_C" >&6 +if test "${ac_cv_c_stdcall_decoration+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + saved_libs=$LIBS +LIBS="conftest_asm.s $LIBS" +if test "$ac_cv_c_extern_prefix" = "yes" +then +cat > conftest_asm.s <<EOF + .globl _ac_test@0 +_ac_test@0: +EOF +else +cat > conftest_asm.s <<EOF + .globl ac_test@0 +ac_test@0: +EOF +fi +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +extern void __attribute__((__stdcall__)) ac_test(void); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +ac_test(); return 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stdcall_decoration="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_stdcall_decoration="no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$saved_libs +fi +echo "$as_me:$LINENO: result: $ac_cv_c_stdcall_decoration" >&5 +echo "${ECHO_T}$ac_cv_c_stdcall_decoration" >&6 +if test "$ac_cv_c_stdcall_decoration" = "yes" +then + +cat >>confdefs.h <<\_ACEOF +#define NEED_STDCALL_DECORATION 1 +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking whether assembler accepts .string" >&5 +echo $ECHO_N "checking whether assembler accepts .string... $ECHO_C" >&6 +if test "${ac_cv_c_asm_string+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + saved_libs=$LIBS +LIBS="conftest_asm.s $LIBS" +cat > conftest_asm.s <<EOF + .string "test" +EOF +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_asm_string="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_asm_string="no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$saved_libs +fi +echo "$as_me:$LINENO: result: $ac_cv_c_asm_string" >&5 +echo "${ECHO_T}$ac_cv_c_asm_string" >&6 +if test "$ac_cv_c_asm_string" = "yes" +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_STRING 1 +_ACEOF + +fi + + +LDSHARED="" +LDDLLFLAGS="" +DLLIBS="" + +case $target_os in + cygwin|mingw32) + # 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 + ;; + *) + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_extern_prefix="yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_extern_prefix="no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$saved_libs +ac_header_compiler=no fi -echo "$as_me:$LINENO: result: $ac_cv_c_extern_prefix" >&5 -echo "${ECHO_T}$ac_cv_c_extern_prefix" >&6 -if test "$ac_cv_c_extern_prefix" = "yes" -then +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -cat >>confdefs.h <<\_ACEOF -#define NEED_UNDERSCORE_PREFIX 1 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> _ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -echo "$as_me:$LINENO: checking whether stdcall symbols need to be decorated" >&5 -echo $ECHO_N "checking whether stdcall symbols need to be decorated... $ECHO_C" >&6 -if test "${ac_cv_c_stdcall_decoration+set}" = set; then +for ac_func in dlopen +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - saved_libs=$LIBS -LIBS="conftest_asm.s $LIBS" -if test "$ac_cv_c_extern_prefix" = "yes" -then -cat > conftest_asm.s <<EOF - .globl _ac_test@0 -_ac_test@0: -EOF -else -cat > conftest_asm.s <<EOF - .globl ac_test@0 -ac_test@0: -EOF -fi -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -extern void __attribute__((__stdcall__)) ac_test(void); +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -9358,7 +9385,15 @@ extern void __attribute__((__stdcall__)) ac_test(void); int main () { -ac_test(); return 0 +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + ; return 0; } @@ -9375,41 +9410,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_stdcall_decoration="yes" + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_stdcall_decoration="no" +eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$saved_libs fi -echo "$as_me:$LINENO: result: $ac_cv_c_stdcall_decoration" >&5 -echo "${ECHO_T}$ac_cv_c_stdcall_decoration" >&6 -if test "$ac_cv_c_stdcall_decoration" = "yes" -then - -cat >>confdefs.h <<\_ACEOF -#define NEED_STDCALL_DECORATION 1 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -fi - - -echo "$as_me:$LINENO: checking whether assembler accepts .string" >&5 -echo $ECHO_N "checking whether assembler accepts .string... $ECHO_C" >&6 -if test "${ac_cv_c_asm_string+set}" = set; then +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - saved_libs=$LIBS -LIBS="conftest_asm.s $LIBS" -cat > conftest_asm.s <<EOF - .string "test" -EOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -9419,7 +9453,7 @@ cat >conftest.$ac_ext <<_ACEOF int main () { - +dlopen (); ; return 0; } @@ -9436,76 +9470,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_asm_string="yes" + ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_asm_string="no" +ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$saved_libs +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_c_asm_string" >&5 -echo "${ECHO_T}$ac_cv_c_asm_string" >&6 -if test "$ac_cv_c_asm_string" = "yes" -then +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ASM_STRING 1 +#define HAVE_DLOPEN 1 _ACEOF + DLLIBS="-ldl" +else + LIBEXT="a" fi - -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 +fi 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 + LIBEXT="a" fi - if test "$DLLWRAP" = "dllwrap"; then - LIBEXT="dll" - else - LIBEXT="a" - fi - ;; - *) +done + + + if test "$LIBEXT" = "so" + then 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 @@ -9615,9 +9613,9 @@ echo "${ECHO_T}$ac_cv_c_dll_unixware" >&6 LDDLLFLAGS="-Wl,-B,symbolic" fi fi - ;; - esac -fi + fi + ;; +esac if test "$LIBEXT" = "a"; then { { echo "$as_me:$LINENO: error: could not find a way to build shared libraries. @@ -9656,6 +9654,7 @@ fi + wine_cv_libc_reentrant=no echo "$as_me:$LINENO: checking for reentrant libc: __errno_location" >&5 @@ -13183,7 +13182,6 @@ s,@LDCONFIG@,$LDCONFIG,;t t s,@LINT@,$LINT,;t t s,@LINTFLAGS@,$LINTFLAGS,;t t s,@LDCOMBINE@,$LDCOMBINE,;t t -s,@DLLIBS@,$DLLIBS,;t t s,@JPEGLIB@,$JPEGLIB,;t t s,@XLIB@,$XLIB,;t t s,@XFILES@,$XFILES,;t t @@ -13201,6 +13199,7 @@ s,@ARTSCCONFIG@,$ARTSCCONFIG,;t t s,@ARTSLIBS@,$ARTSLIBS,;t t s,@ARTSINCL@,$ARTSINCL,;t t s,@DLLWRAP@,$DLLWRAP,;t t +s,@DLLIBS@,$DLLIBS,;t t s,@DLLFLAGS@,$DLLFLAGS,;t t s,@DLLEXT@,$DLLEXT,;t t s,@LDSHARED@,$LDSHARED,;t t diff --git a/configure.ac b/configure.ac index f904b5fe99c..b2e6e4dc45f 100644 --- a/configure.ac +++ b/configure.ac @@ -95,18 +95,6 @@ AC_CHECK_LIB(xpg4,_xpg4_setrunelocale) dnl Check for -lmmap for OS/2 AC_CHECK_LIB(mmap,mmap) -DLLIBS="" -AC_SUBST(DLLIBS) -AC_CHECK_HEADERS(dlfcn.h, - [AC_CHECK_FUNCS(dlopen,, - [AC_CHECK_LIB(dl,dlopen, - [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) - DLLIBS="-ldl"], - LIBEXT="a")] - )], - LIBEXT="a" - ) - JPEGLIB="" AC_SUBST(JPEGLIB) AC_CHECK_HEADERS(jpeglib.h, @@ -710,19 +698,29 @@ dnl **** Check for working dll **** LDSHARED="" LDDLLFLAGS="" -if test "$LIBEXT" = "so" -then - 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 - ;; - *) +DLLIBS="" + +case $target_os in + cygwin|mingw32) + 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_CHECK_HEADERS(dlfcn.h, + [AC_CHECK_FUNCS(dlopen,, + [AC_CHECK_LIB(dl,dlopen, + [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) + DLLIBS="-ldl"], + [LIBEXT="a"])])], + [LIBEXT="a"]) + + if test "$LIBEXT" = "so" + then 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" @@ -747,9 +745,9 @@ then LDDLLFLAGS="-Wl,-B,symbolic" fi fi - ;; - esac -fi + fi + ;; +esac if test "$LIBEXT" = "a"; then AC_MSG_ERROR( @@ -773,6 +771,7 @@ elif test "$LIBEXT" = "dll"; then LDPATH="PATH=\"\$(TOPOBJDIR)/library:\$(TOPOBJDIR)/unicode:\$\$PATH\"" fi +AC_SUBST(DLLIBS) AC_SUBST(DLLFLAGS) AC_SUBST(DLLEXT) AC_SUBST(LDSHARED) -- GitLab