diff --git a/configure b/configure index 8eebf24cd34aeea0249578745fee9fbe8ed033e2..4463c60a6d50fcc9023bee31fe77922d7dd3ebbf 100755 --- a/configure +++ b/configure @@ -10784,13 +10784,13 @@ done if test "$ac_cv_header_dbus_dbus_h" = "yes" -a "$ac_cv_header_hal_libhal_h" = "yes" then - { echo "$as_me:$LINENO: checking for libhal_ctx_new in -lhal" >&5 -echo $ECHO_N "checking for libhal_ctx_new in -lhal... $ECHO_C" >&6; } -if test "${ac_cv_lib_hal_libhal_ctx_new+set}" = set; then + { echo "$as_me:$LINENO: checking for dbus_connection_close in -ldbus-1" >&5 +echo $ECHO_N "checking for dbus_connection_close in -ldbus-1... $ECHO_C" >&6; } +if test "${ac_cv_lib_dbus_1_dbus_connection_close+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lhal $LIBS" +LIBS="-ldbus-1 $ac_hal_libs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10804,11 +10804,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char libhal_ctx_new (); +char dbus_connection_close (); int main () { -return libhal_ctx_new (); +return dbus_connection_close (); ; return 0; } @@ -10831,29 +10831,29 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_hal_libhal_ctx_new=yes + ac_cv_lib_dbus_1_dbus_connection_close=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hal_libhal_ctx_new=no + ac_cv_lib_dbus_1_dbus_connection_close=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_hal_libhal_ctx_new" >&5 -echo "${ECHO_T}$ac_cv_lib_hal_libhal_ctx_new" >&6; } -if test $ac_cv_lib_hal_libhal_ctx_new = yes; then - { echo "$as_me:$LINENO: checking for dbus_connection_close in -ldbus-1" >&5 -echo $ECHO_N "checking for dbus_connection_close in -ldbus-1... $ECHO_C" >&6; } -if test "${ac_cv_lib_dbus_1_dbus_connection_close+set}" = set; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dbus_1_dbus_connection_close" >&5 +echo "${ECHO_T}$ac_cv_lib_dbus_1_dbus_connection_close" >&6; } +if test $ac_cv_lib_dbus_1_dbus_connection_close = yes; then + { echo "$as_me:$LINENO: checking for -lhal" >&5 +echo $ECHO_N "checking for -lhal... $ECHO_C" >&6; } +if test "${ac_cv_lib_soname_hal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldbus-1 $ac_hal_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF + ac_check_soname_save_LIBS=$LIBS +LIBS="-lhal $ac_hal_libs $LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10866,11 +10866,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char dbus_connection_close (); +char libhal_ctx_new (); int main () { -return dbus_connection_close (); +return libhal_ctx_new (); ; return 0; } @@ -10893,27 +10893,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_dbus_1_dbus_connection_close=yes + case "$LIBEXT" in + dll) ;; + dylib) ac_cv_lib_soname_hal=`otool -L conftest$ac_exeext | grep "libhal\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libhal\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;; + *) ac_cv_lib_soname_hal=`$ac_cv_path_LDD conftest$ac_exeext | grep "libhal\\.$LIBEXT" | sed -e "s/^.*\(libhal\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;; + esac else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dbus_1_dbus_connection_close=no + fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + LIBS=$ac_check_soname_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dbus_1_dbus_connection_close" >&5 -echo "${ECHO_T}$ac_cv_lib_dbus_1_dbus_connection_close" >&6; } -if test $ac_cv_lib_dbus_1_dbus_connection_close = yes; then +if test "x$ac_cv_lib_soname_hal" = "x"; then + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBHAL 1 +else + { echo "$as_me:$LINENO: result: $ac_cv_lib_soname_hal" >&5 +echo "${ECHO_T}$ac_cv_lib_soname_hal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SONAME_LIBHAL "$ac_cv_lib_soname_hal" _ACEOF - HALINCL="$ac_hal_cflags" + HALINCL="$ac_hal_cflags" fi fi @@ -14879,84 +14887,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -fi - -{ echo "$as_me:$LINENO: checking for -lhal" >&5 -echo $ECHO_N "checking for -lhal... $ECHO_C" >&6; } -if test "${ac_cv_lib_soname_hal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_soname_save_LIBS=$LIBS -LIBS="-lhal $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libhal_ctx_new (); -int -main () -{ -return libhal_ctx_new (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - case "$LIBEXT" in - dll) ;; - dylib) ac_cv_lib_soname_hal=`otool -L conftest$ac_exeext | grep "libhal\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libhal\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;; - *) ac_cv_lib_soname_hal=`$ac_cv_path_LDD conftest$ac_exeext | grep "libhal\\.$LIBEXT" | sed -e "s/^.*\(libhal\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;; - esac -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_soname_save_LIBS -fi -if test "x$ac_cv_lib_soname_hal" = "x"; then - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } - -else - { echo "$as_me:$LINENO: result: $ac_cv_lib_soname_hal" >&5 -echo "${ECHO_T}$ac_cv_lib_soname_hal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define SONAME_LIBHAL "$ac_cv_lib_soname_hal" -_ACEOF - - fi { echo "$as_me:$LINENO: checking for -ltxc_dxtn" >&5 diff --git a/configure.ac b/configure.ac index 2f0a56901d346503f206c9c9487ffa28a62cdea5..e300937b53c8a47d76e4f50ab01355e59b63df11 100644 --- a/configure.ac +++ b/configure.ac @@ -676,10 +676,9 @@ then AC_CHECK_HEADERS([dbus/dbus.h hal/libhal.h]) if test "$ac_cv_header_dbus_dbus_h" = "yes" -a "$ac_cv_header_hal_libhal_h" = "yes" then - AC_CHECK_LIB(hal, libhal_ctx_new, - [AC_CHECK_LIB(dbus-1, dbus_connection_close, - [AC_DEFINE(HAVE_LIBHAL, 1, [Define if you have the hal library]) - HALINCL="$ac_hal_cflags"],,$ac_hal_libs)]) + AC_CHECK_LIB(dbus-1, dbus_connection_close, + [WINE_CHECK_SONAME(hal, libhal_ctx_new, + [HALINCL="$ac_hal_cflags"],,[$ac_hal_libs])],,[$ac_hal_libs]) fi CPPFLAGS="$ac_save_CPPFLAGS" fi @@ -1117,7 +1116,6 @@ WINE_CHECK_SONAME(Xrandr,XRRQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lX11 $X_EXTRA_LIBS]) WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS]) WINE_CHECK_SONAME(GL,glXQueryExtension,,,[$X_LIBS $X_EXTRA_LIBS]) -WINE_CHECK_SONAME(hal,libhal_ctx_new) WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1) WINE_CHECK_SONAME(cups,cupsGetDefault) WINE_CHECK_SONAME(jack,jack_client_new) diff --git a/include/config.h.in b/include/config.h.in index dc8b6137954dca3d9b6b804582fbacb2a6d6b674..a466d47521a931029854d638c49b0eff0dad64be 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -297,9 +297,6 @@ /* Define to 1 if you have the <libaudioio.h> header file. */ #undef HAVE_LIBAUDIOIO_H -/* Define if you have the hal library */ -#undef HAVE_LIBHAL - /* Define to 1 if you have the `i386' library (-li386). */ #undef HAVE_LIBI386 diff --git a/programs/explorer/hal.c b/programs/explorer/hal.c index 47c6708675fd86c204eddd3c5ff8ddedd429abcb..6b5be469bdbf7d39300d870922d50919bca7be80 100644 --- a/programs/explorer/hal.c +++ b/programs/explorer/hal.c @@ -40,7 +40,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); -#ifdef HAVE_LIBHAL +#ifdef SONAME_LIBHAL #include <dbus/dbus.h> #include <hal/libhal.h> @@ -75,10 +75,6 @@ DBUS_FUNCS; HAL_FUNCS; #undef DO_FUNC -#ifndef SONAME_LIBHAL -#define SONAME_LIBHAL "libhal" SONAME_EXT -#endif - static BOOL load_functions(void) { void *hal_handle; @@ -240,11 +236,11 @@ void initialize_hal(void) CloseHandle( handle ); } -#else /* HAVE_LIBHAL */ +#else /* SONAME_LIBHAL */ void initialize_hal(void) { WINE_TRACE( "Skipping, HAL support not compiled in\n" ); } -#endif /* HAVE_LIBHAL */ +#endif /* SONAME_LIBHAL */