configure: Add pkg-config support for libcapi20.

This commit is contained in:
Alexandre Julliard 2013-07-31 19:49:37 +02:00
parent 079f8aee18
commit 621377f492
3 changed files with 57 additions and 29 deletions

61
configure vendored
View File

@ -649,6 +649,8 @@ JPEG_LIBS
JPEG_CFLAGS
FONTCONFIGINCL
CUPSINCL
CAPI20_LIBS
CAPI20_CFLAGS
OSS4INCL
ALSALIBS
GSTREAMER_LIBS
@ -890,6 +892,8 @@ FREETYPE_CFLAGS
FREETYPE_LIBS
GSTREAMER_CFLAGS
GSTREAMER_LIBS
CAPI20_CFLAGS
CAPI20_LIBS
JPEG_CFLAGS
JPEG_LIBS
PNG_CFLAGS
@ -1615,6 +1619,9 @@ Some influential environment variables:
C compiler flags for gstreamer-app-0.10, overriding pkg-config
GSTREAMER_LIBS
Linker flags for gstreamer-app-0.10, overriding pkg-config
CAPI20_CFLAGS
C compiler flags for capi20, overriding pkg-config
CAPI20_LIBS Linker flags for capi20, overriding pkg-config
JPEG_CFLAGS C compiler flags for libjpeg, overriding pkg-config
JPEG_LIBS Linker flags for libjpeg, overriding pkg-config
PNG_CFLAGS C compiler flags for libpng, overriding pkg-config
@ -2620,7 +2627,7 @@ fi
# Check whether --with-capi was given.
if test "${with_capi+set}" = set; then :
withval=$with_capi; if test "x$withval" = "xno"; then ac_cv_header_capi20_h=no; ac_cv_header_linux_capi_h=no; fi
withval=$with_capi;
fi
@ -5946,7 +5953,6 @@ for ac_header in \
arpa/inet.h \
arpa/nameser.h \
asm/types.h \
capi20.h \
curses.h \
direct.h \
dirent.h \
@ -6379,20 +6385,6 @@ fi
done
for ac_header in linux/capi.h
do :
ac_fn_c_check_header_compile "$LINENO" "linux/capi.h" "ac_cv_header_linux_capi_h" "#define __user
"
if test "x$ac_cv_header_linux_capi_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LINUX_CAPI_H 1
_ACEOF
fi
done
DLLEXT=""
@ -11457,6 +11449,36 @@ fi
fi
fi
if test "x$with_capi" != "xno"
then
if test -n "$CAPI20_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then :
CAPI20_CFLAGS=`$PKG_CONFIG --cflags capi20 2>/dev/null`
fi
if test -n "$CAPI20_LIBS"; then :
elif test -n "$PKG_CONFIG"; then :
CAPI20_LIBS=`$PKG_CONFIG --libs capi20 2>/dev/null`
fi
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CAPI20_CFLAGS"
for ac_header in capi20.h linux/capi.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#define __user
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
then
@ -11466,7 +11488,7 @@ if ${ac_cv_lib_soname_capi20+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lcapi20 $LIBS"
LIBS="-lcapi20 $CAPI20_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -11514,6 +11536,11 @@ _ACEOF
fi
fi
CPPFLAGS=$ac_save_CPPFLAGS
test -z "$CAPI20_CFLAGS" || CAPI20_CFLAGS=`echo " $CAPI20_CFLAGS" | sed 's/ -I\([^/]\)/ -I\$(top_builddir)\/\1/g'`
test -z "$CAPI20_LIBS" || CAPI20_LIBS=`echo " $CAPI20_LIBS" | sed 's/ -L\([^/]\)/ -L\$(top_builddir)\/\1/g'`
fi
if test "x$ac_cv_lib_soname_capi20" = "x"; then :
case "x$with_capi" in
x) as_fn_append wine_notices "|libcapi20 ${notice_platform}development files not found, ISDN won't be supported." ;;

View File

@ -33,8 +33,7 @@ AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)]),
[if test "x$withval" = "xno"; then ac_cv_header_capi20_h=no; ac_cv_header_linux_capi_h=no; fi])
AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)]))
AC_ARG_WITH(cms, AS_HELP_STRING([--without-cms],[do not use CMS (color management support)]))
AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the CoreAudio sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_CoreAudio_CoreAudio_h=no; fi])
@ -411,7 +410,6 @@ AC_CHECK_HEADERS(\
arpa/inet.h \
arpa/nameser.h \
asm/types.h \
capi20.h \
curses.h \
direct.h \
dirent.h \
@ -663,9 +661,6 @@ AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h libv4l1.h],,,
#include <asm/types.h>
#endif])
dnl Check for broken kernel header that doesn't define __user
AC_CHECK_HEADERS([linux/capi.h],,,[#define __user])
dnl **** Check for working dll ****
AC_SUBST(DLLEXT,"")
@ -1587,10 +1582,15 @@ then
fi
dnl **** Check for capi4linux ****
if test "x$with_capi" != "xno"
then
WINE_PACKAGE_FLAGS(CAPI20,[capi20],,,,
dnl Check for broken kernel header that doesn't define __user
[AC_CHECK_HEADERS([capi20.h linux/capi.h],,,[#define __user])
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
then
WINE_CHECK_SONAME(capi20,capi20_register)
WINE_CHECK_SONAME(capi20,capi20_register,,,[$CAPI20_LIBS])
fi])
fi
WINE_NOTICE_WITH(capi,[test "x$ac_cv_lib_soname_capi20" = "x"],
[libcapi20 ${notice_platform}development files not found, ISDN won't be supported.])

View File

@ -1,5 +1,6 @@
MODULE = capi2032.dll
IMPORTLIB = capi2032
EXTRAINCL = @CAPI20_CFLAGS@
C_SRCS = cap20wxx.c