Commit ccd5f284 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Make the libfontconfig soname check depend on the header check.

parent 34200c35
......@@ -13746,6 +13746,88 @@ fi
fi
if test "$ac_cv_header_fontconfig_fontconfig_h" = "yes"
then
{ echo "$as_me:$LINENO: checking for -lfontconfig" >&5
echo $ECHO_N "checking for -lfontconfig... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_fontconfig+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lfontconfig $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 FcInit ();
int
main ()
{
return FcInit ();
;
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_fontconfig=`otool -L conftest$ac_exeext | grep "libfontconfig\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libfontconfig\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_fontconfig=`$ac_cv_path_LDD conftest$ac_exeext | grep "libfontconfig\\.$LIBEXT" | sed -e "s/^.*\(libfontconfig\.$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_fontconfig" = "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_fontconfig" >&5
echo "${ECHO_T}$ac_cv_lib_soname_fontconfig" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBFONTCONFIG "$ac_cv_lib_soname_fontconfig"
_ACEOF
fi
fi
EXTRACFLAGS=""
......@@ -15236,84 +15318,6 @@ _ACEOF
fi
{ echo "$as_me:$LINENO: checking for -lfontconfig" >&5
echo $ECHO_N "checking for -lfontconfig... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_fontconfig+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lfontconfig $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 FcInit ();
int
main ()
{
return FcInit ();
;
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_fontconfig=`otool -L conftest$ac_exeext | grep "libfontconfig\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libfontconfig\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_fontconfig=`$ac_cv_path_LDD conftest$ac_exeext | grep "libfontconfig\\.$LIBEXT" | sed -e "s/^.*\(libfontconfig\.$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_fontconfig" = "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_fontconfig" >&5
echo "${ECHO_T}$ac_cv_lib_soname_fontconfig" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBFONTCONFIG "$ac_cv_lib_soname_fontconfig"
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for -lssl" >&5
echo $ECHO_N "checking for -lssl... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_ssl+set}" = set; then
......
......@@ -979,6 +979,12 @@ then
WINE_CHECK_SONAME(jack,jack_client_new)
fi
dnl **** Check for fontconfig ****
if test "$ac_cv_header_fontconfig_fontconfig_h" = "yes"
then
WINE_CHECK_SONAME(fontconfig,FcInit)
fi
dnl **** Check for gcc specific options ****
AC_SUBST(EXTRACFLAGS,"")
......@@ -1127,7 +1133,6 @@ 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(txc_dxtn,fetch_2d_texel_rgba_dxt1)
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)
......
......@@ -182,7 +182,7 @@ static FT_TrueTypeEngineType (*pFT_Get_TrueType_Engine_Type)(FT_Library);
MAKE_FUNCPTR(FT_Get_WinFNT_Header);
#endif
#ifdef HAVE_FONTCONFIG_FONTCONFIG_H
#ifdef SONAME_LIBFONTCONFIG
#include <fontconfig/fontconfig.h>
MAKE_FUNCPTR(FcConfigGetCurrent);
MAKE_FUNCPTR(FcFontList);
......@@ -195,9 +195,6 @@ MAKE_FUNCPTR(FcPatternCreate);
MAKE_FUNCPTR(FcPatternDestroy);
MAKE_FUNCPTR(FcPatternGetBool);
MAKE_FUNCPTR(FcPatternGetString);
#ifndef SONAME_LIBFONTCONFIG
#define SONAME_LIBFONTCONFIG "libfontconfig" SONAME_EXT
#endif
#endif
#undef MAKE_FUNCPTR
......@@ -1481,7 +1478,7 @@ static BOOL ReadFontDir(const char *dirname, BOOL external_fonts)
static void load_fontconfig_fonts(void)
{
#ifdef HAVE_FONTCONFIG_FONTCONFIG_H
#ifdef SONAME_LIBFONTCONFIG
void *fc_handle = NULL;
FcConfig *config;
FcPattern *pat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment