configure: Add a check for the gettextpo library.

This commit is contained in:
Alexandre Julliard 2011-01-04 11:16:50 +01:00
parent b84f2f229b
commit 0e79c5c1c3
3 changed files with 90 additions and 1 deletions

70
configure vendored
View File

@ -622,6 +622,7 @@ GSTREAMER_LIBS
ESDLIBS
ESDINCL
ESDCONFIG
LIBGETTEXTPO
ZLIB
FREETYPEINCL
FREETYPELIBS
@ -777,6 +778,7 @@ with_curses
with_esd
with_fontconfig
with_freetype
with_gettextpo
with_gphoto
with_glu
with_gnutls
@ -1467,6 +1469,7 @@ Optional Packages:
--without-esd do not use the EsounD sound support
--without-fontconfig do not use fontconfig
--without-freetype do not use the FreeType library
--without-gettextpo do not use the GetTextPO library
--without-gphoto do not use gphoto (Digital Camera support)
--without-glu do not use the GLU library
--without-gnutls do not use GnuTLS (schannel support)
@ -2561,6 +2564,12 @@ if test "${with_freetype+set}" = set; then :
fi
# Check whether --with-gettextpo was given.
if test "${with_gettextpo+set}" = set; then :
withval=$with_gettextpo; if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi
fi
# Check whether --with-gphoto was given.
if test "${with_gphoto+set}" = set; then :
withval=$with_gphoto;
@ -5783,6 +5792,7 @@ for ac_header in \
fnmatch.h \
fontconfig/fontconfig.h \
getopt.h \
gettext-po.h \
grp.h \
gsm.h \
gsm/gsm.h \
@ -10581,6 +10591,65 @@ fi
fi
if test "x$enable_tools" != xno
then
if test "$ac_cv_header_gettext_po_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for po_file_write in -lgettextpo" >&5
$as_echo_n "checking for po_file_write in -lgettextpo... " >&6; }
if test "${ac_cv_lib_gettextpo_po_file_write+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgettextpo $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 po_file_write ();
int
main ()
{
return po_file_write ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_gettextpo_po_file_write=yes
else
ac_cv_lib_gettextpo_po_file_write=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gettextpo_po_file_write" >&5
$as_echo "$ac_cv_lib_gettextpo_po_file_write" >&6; }
if test "x$ac_cv_lib_gettextpo_po_file_write" = x""yes; then :
$as_echo "#define HAVE_LIBGETTEXTPO 1" >>confdefs.h
LIBGETTEXTPO="-lgettextpo"
fi
fi
if test "x$LIBGETTEXTPO" = "x"; then :
case "x$with_gettextpo" in
x) as_fn_append wine_warnings "|GetText ${notice_platform}development files not found. Internationalization won't be fully supported." ;;
xno) ;;
*) as_fn_error $? "GetText ${notice_platform}development files not found. Internationalization won't be fully supported.
This is an error since --with-gettextpo was requested." "$LINENO" 5 ;;
esac
fi
fi
if test "x$with_esd" != xno
then
save_CFLAGS="$CFLAGS"
@ -15395,7 +15464,6 @@ if test "x$enable_maintainer_mode" = xyes
then
wine_fn_append_rule ALL_MAKEFILE_DEPENDS "\$(srcdir)/configure: configure.ac aclocal.m4
cd \$(srcdir) && autoconf --warnings=all
\$(srcdir)/include/config.h.in: include/stamp-h.in
\$(srcdir)/include/stamp-h.in: configure.ac aclocal.m4
cd \$(srcdir) && autoheader --warnings=all

View File

@ -46,6 +46,8 @@ AC_ARG_WITH(esd, AS_HELP_STRING([--without-esd],[do not use the EsounD sou
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]),
[if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi])
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--without-gettextpo],[do not use the GetTextPO library]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
AC_ARG_WITH(gphoto, AS_HELP_STRING([--without-gphoto],[do not use gphoto (Digital Camera support)]))
AC_ARG_WITH(glu, AS_HELP_STRING([--without-glu],[do not use the GLU library]),
[if test "x$withval" = "xno"; then ac_cv_header_GL_glu_h=no; fi])
@ -393,6 +395,7 @@ AC_CHECK_HEADERS(\
fnmatch.h \
fontconfig/fontconfig.h \
getopt.h \
gettext-po.h \
grp.h \
gsm.h \
gsm/gsm.h \
@ -1407,6 +1410,18 @@ then
AC_SUBST(ZLIB,"-lz")])
fi
dnl **** Check for gettextpo ****
if test "x$enable_tools" != xno
then
if test "$ac_cv_header_gettext_po_h" = "yes"
then
AC_CHECK_LIB(gettextpo,po_file_write,
[AC_DEFINE(HAVE_LIBGETTEXTPO,1,[Define to 1 if you have the `gettextpo' library (-lgettextpo).])
AC_SUBST(LIBGETTEXTPO,"-lgettextpo")])
fi
WINE_WARNING_WITH(gettextpo,[test "x$LIBGETTEXTPO" = "x"],[GetText ${notice_platform}development files not found. Internationalization won't be fully supported.])
fi
dnl **** Check for EsounD ****
if test "x$with_esd" != xno
then

View File

@ -226,6 +226,9 @@
/* Define to 1 if you have the `getservbyport' function. */
#undef HAVE_GETSERVBYPORT
/* Define to 1 if you have the <gettext-po.h> header file. */
#undef HAVE_GETTEXT_PO_H
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
@ -352,6 +355,9 @@
/* Define to 1 if you have the `ldap_parse_vlv_control' function. */
#undef HAVE_LDAP_PARSE_VLV_CONTROL
/* Define to 1 if you have the `gettextpo' library (-lgettextpo). */
#undef HAVE_LIBGETTEXTPO
/* Define to 1 if you have the `i386' library (-li386). */
#undef HAVE_LIBI386