configure: Merge the libcapi20 existence check with the soname check.
This commit is contained in:
parent
d0783774e7
commit
3336e9bf05
|
@ -13432,12 +13432,12 @@ fi
|
|||
|
||||
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
|
||||
then
|
||||
{ echo "$as_me:$LINENO: checking for capi20_register in -lcapi20" >&5
|
||||
echo $ECHO_N "checking for capi20_register in -lcapi20... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_capi20_capi20_register+set}" = set; then
|
||||
{ echo "$as_me:$LINENO: checking for -lcapi20" >&5
|
||||
echo $ECHO_N "checking for -lcapi20... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_capi20+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lcapi20 $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -13479,26 +13479,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_capi20_capi20_register=yes
|
||||
case "$LIBEXT" in
|
||||
dll) ;;
|
||||
dylib) ac_cv_lib_soname_capi20=`otool -L conftest$ac_exeext | grep "libcapi20\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libcapi20\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_capi20=`$ac_cv_path_LDD conftest$ac_exeext | grep "libcapi20\\.$LIBEXT" | sed -e "s/^.*\(libcapi20\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
|
||||
esac
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_capi20_capi20_register=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_capi20_capi20_register" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_capi20_capi20_register" >&6; }
|
||||
if test $ac_cv_lib_capi20_capi20_register = yes; then
|
||||
if test "x$ac_cv_lib_soname_capi20" = "x"; then
|
||||
{ echo "$as_me:$LINENO: result: not found" >&5
|
||||
echo "${ECHO_T}not found" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_CAPI4LINUX 1
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_capi20" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_capi20" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBCAPI20 "$ac_cv_lib_soname_capi20"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -15459,84 +15468,6 @@ cat >>confdefs.h <<_ACEOF
|
|||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lcapi20" >&5
|
||||
echo $ECHO_N "checking for -lcapi20... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_capi20+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lcapi20 $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 capi20_isinstalled ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return capi20_isinstalled ();
|
||||
;
|
||||
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_capi20=`otool -L conftest$ac_exeext | grep "libcapi20\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libcapi20\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_capi20=`$ac_cv_path_LDD conftest$ac_exeext | grep "libcapi20\\.$LIBEXT" | sed -e "s/^.*\(libcapi20\.$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_capi20" = "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_capi20" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_capi20" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBCAPI20 "$ac_cv_lib_soname_capi20"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lsane" >&5
|
||||
|
|
|
@ -966,7 +966,7 @@ dnl **** Check for capi4linux ****
|
|||
|
||||
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
|
||||
then
|
||||
AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
|
||||
WINE_CHECK_SONAME(capi20,capi20_register)
|
||||
fi
|
||||
|
||||
dnl **** Check for gcc specific options ****
|
||||
|
@ -1123,7 +1123,6 @@ WINE_CHECK_SONAME(fontconfig,FcInit)
|
|||
WINE_CHECK_SONAME(ssl,SSL_library_init)
|
||||
WINE_CHECK_SONAME(crypto,BIO_new_socket)
|
||||
WINE_CHECK_SONAME(jpeg,jpeg_start_decompress)
|
||||
WINE_CHECK_SONAME(capi20,capi20_isinstalled)
|
||||
WINE_CHECK_SONAME(sane,sane_init)
|
||||
|
||||
|
||||
|
|
|
@ -43,11 +43,7 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(capi);
|
||||
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
|
||||
#ifndef SONAME_LIBCAPI20
|
||||
#define SONAME_LIBCAPI20 "libcapi20" SONAME_EXT
|
||||
#endif
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
|
||||
static unsigned (*pcapi20_register)(unsigned, unsigned, unsigned, unsigned *) = NULL;
|
||||
static unsigned (*pcapi20_release)(unsigned) = NULL;
|
||||
|
@ -90,7 +86,7 @@ LOAD_FUNCPTR(capi20_get_version);
|
|||
\*===========================================================================*/
|
||||
|
||||
DWORD WINAPI wrapCAPI_REGISTER (DWORD MessageBufferSize, DWORD maxLogicalConnection, DWORD maxBDataBlocks, DWORD maxBDataLen, DWORD *pApplID) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
unsigned aid = 0;
|
||||
DWORD fret;
|
||||
|
||||
|
@ -110,7 +106,7 @@ DWORD WINAPI wrapCAPI_REGISTER (DWORD MessageBufferSize, DWORD maxLogicalConnect
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_RELEASE (DWORD ApplID) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -127,7 +123,7 @@ DWORD WINAPI wrapCAPI_RELEASE (DWORD ApplID) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_PUT_MESSAGE (DWORD ApplID, PVOID pCAPIMessage) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -144,7 +140,7 @@ DWORD WINAPI wrapCAPI_PUT_MESSAGE (DWORD ApplID, PVOID pCAPIMessage) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_GET_MESSAGE (DWORD ApplID, PVOID *ppCAPIMessage) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -161,7 +157,7 @@ DWORD WINAPI wrapCAPI_GET_MESSAGE (DWORD ApplID, PVOID *ppCAPIMessage) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_WAIT_FOR_SIGNAL (DWORD ApplID) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
TRACE ("(%x)\n", ApplID);
|
||||
|
||||
load_functions();
|
||||
|
@ -177,7 +173,7 @@ DWORD WINAPI wrapCAPI_WAIT_FOR_SIGNAL (DWORD ApplID) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_GET_MANUFACTURER (char *SzBuffer) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -198,7 +194,7 @@ DWORD WINAPI wrapCAPI_GET_MANUFACTURER (char *SzBuffer) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_GET_VERSION (DWORD *pCAPIMajor, DWORD *pCAPIMinor, DWORD *pManufacturerMajor, DWORD *pManufacturerMinor) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
unsigned char version[4 * sizeof (unsigned)];
|
||||
DWORD fret;
|
||||
|
||||
|
@ -221,7 +217,7 @@ DWORD WINAPI wrapCAPI_GET_VERSION (DWORD *pCAPIMajor, DWORD *pCAPIMinor, DWORD *
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_GET_SERIAL_NUMBER (char *SzBuffer) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -238,7 +234,7 @@ DWORD WINAPI wrapCAPI_GET_SERIAL_NUMBER (char *SzBuffer) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_GET_PROFILE (PVOID SzBuffer, DWORD CtlrNr) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
@ -256,7 +252,7 @@ DWORD WINAPI wrapCAPI_GET_PROFILE (PVOID SzBuffer, DWORD CtlrNr) {
|
|||
/*---------------------------------------------------------------------------*\
|
||||
\*---------------------------------------------------------------------------*/
|
||||
DWORD WINAPI wrapCAPI_INSTALLED (void) {
|
||||
#ifdef HAVE_CAPI4LINUX
|
||||
#ifdef SONAME_LIBCAPI20
|
||||
DWORD fret;
|
||||
|
||||
load_functions();
|
||||
|
|
|
@ -35,9 +35,6 @@
|
|||
/* Define to 1 if you have the <capi20.h> header file. */
|
||||
#undef HAVE_CAPI20_H
|
||||
|
||||
/* Define if you have capi4linux libs and headers */
|
||||
#undef HAVE_CAPI4LINUX
|
||||
|
||||
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
|
||||
#undef HAVE_CARBON_CARBON_H
|
||||
|
||||
|
|
Loading…
Reference in New Issue