Damjan Jovanovic : configure: Check for libicns.
Alexandre Julliard
julliard at winehq.org
Mon Aug 23 10:50:19 CDT 2010
Module: wine
Branch: master
Commit: ebee19701cd95103342724151347657d86192079
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ebee19701cd95103342724151347657d86192079
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Sun Aug 22 19:12:45 2010 +0200
configure: Check for libicns.
---
configure | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 14 +++++++++
include/config.h.in | 6 ++++
3 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 22fe16f..d61a5b9 100755
--- a/configure
+++ b/configure
@@ -780,6 +780,7 @@ with_glu
with_gnutls
with_gsm
with_hal
+with_icns
with_jack
with_jpeg
with_ldap
@@ -1467,6 +1468,7 @@ Optional Packages:
--without-gnutls do not use GnuTLS (schannel support)
--without-gsm do not use libgsm (GSM 06.10 codec support)
--without-hal do not use HAL (dynamic device support)
+ --without-icns do not use ICNS icon support
--without-jack do not use the Jack sound support
--without-jpeg do not use JPEG
--without-ldap do not use LDAP
@@ -2584,6 +2586,12 @@ if test "${with_hal+set}" = set; then :
fi
+# Check whether --with-icns was given.
+if test "${with_icns+set}" = set; then :
+ withval=$with_icns; if test "x$withval" = "xno"; then ac_cv_header_icns_h=no; fi
+fi
+
+
# Check whether --with-jack was given.
if test "${with_jack+set}" = set; then :
withval=$with_jack; if test "x$withval" = "xno"; then ac_cv_header_jack_jack_h=no; fi
@@ -5806,6 +5814,7 @@ for ac_header in \
grp.h \
gsm.h \
gsm/gsm.h \
+ icns.h \
ieeefp.h \
inet/mib2.h \
io.h \
@@ -11088,6 +11097,71 @@ This is an error since --with-gsm was requested." "$LINENO" 5 ;;
esac
fi
+if test "$ac_cv_header_icns_h" = "yes"
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -licns" >&5
+$as_echo_n "checking for -licns... " >&6; }
+if test "${ac_cv_lib_soname_icns+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_soname_save_LIBS=$LIBS
+LIBS="-licns $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 icns_write_family_to_file ();
+int
+main ()
+{
+return icns_write_family_to_file ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ case "$LIBEXT" in
+ dll) ac_cv_lib_soname_icns=`$ac_cv_path_LDD conftest.exe | grep "icns" | sed -e "s/dll.*/dll/"';2,$d'` ;;
+ dylib) ac_cv_lib_soname_icns=`otool -L conftest$ac_exeext | grep "libicns\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libicns\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
+ *) ac_cv_lib_soname_icns=`$ac_cv_path_LDD conftest$ac_exeext | grep "libicns\\.$LIBEXT" | sed -e "s/^.*\(libicns\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
+ esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_soname_save_LIBS
+fi
+if test "x$ac_cv_lib_soname_icns" = "x"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_icns" >&5
+$as_echo "$ac_cv_lib_soname_icns" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define SONAME_LIBICNS "$ac_cv_lib_soname_icns"
+_ACEOF
+
+
+fi
+fi
+case $host_os in
+ darwin*|macosx*)
+ if test "x$ac_cv_lib_soname_icns" = "x"; then :
+ case "x$with_icns" in
+ x) as_fn_append wine_notices "|libicns ${notice_platform}development files not found, ICNS icons won't be supported." ;;
+ xno) ;;
+ *) as_fn_error "libicns ${notice_platform}development files not found, ICNS icons won't be supported.
+This is an error since --with-icns was requested." "$LINENO" 5 ;;
+esac
+fi ;;
+esac
+
if test "$ac_cv_header_jpeglib_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ljpeg" >&5
diff --git a/configure.ac b/configure.ac
index 5b8a199..b02c7aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,8 @@ AC_ARG_WITH(gnutls, AS_HELP_STRING([--without-gnutls],[do not use GnuTLS (sch
AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06.10 codec support)]),
[if test "x$withval" = "xno"; then ac_cv_header_gsm_h=no; ac_cv_header_gsm_gsm_h=no; fi])
AC_ARG_WITH(hal, AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
+AC_ARG_WITH(icns, AS_HELP_STRING([--without-icns],[do not use ICNS icon support]),
+ [if test "x$withval" = "xno"; then ac_cv_header_icns_h=no; fi])
AC_ARG_WITH(jack, AS_HELP_STRING([--without-jack],[do not use the Jack sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_jack_jack_h=no; fi])
AC_ARG_WITH(jpeg, AS_HELP_STRING([--without-jpeg],[do not use JPEG]),
@@ -396,6 +398,7 @@ AC_CHECK_HEADERS(\
grp.h \
gsm.h \
gsm/gsm.h \
+ icns.h \
ieeefp.h \
inet/mib2.h \
io.h \
@@ -1487,6 +1490,17 @@ fi
WINE_NOTICE_WITH(gsm,[test "x$ac_cv_lib_soname_gsm" = "x"],
[libgsm ${notice_platform}development files not found, gsm 06.10 codec won't be supported.])
+dnl **** Check for libicns ****
+if test "$ac_cv_header_icns_h" = "yes"
+then
+ WINE_CHECK_SONAME(icns,icns_write_family_to_file)
+fi
+case $host_os in
+ darwin*|macosx*)
+ WINE_NOTICE_WITH(icns,[test "x$ac_cv_lib_soname_icns" = "x"],
+ [libicns ${notice_platform}development files not found, ICNS icons won't be supported.]) ;;
+esac
+
dnl **** Check for libjpeg ****
if test "$ac_cv_header_jpeglib_h" = "yes"
then
diff --git a/include/config.h.in b/include/config.h.in
index f365fca..98a951f 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -256,6 +256,9 @@
/* Define to 1 if you have the <hal/libhal.h> header file. */
#undef HAVE_HAL_LIBHAL_H
+/* Define to 1 if you have the <icns.h> header file. */
+#undef HAVE_ICNS_H
+
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
@@ -1195,6 +1198,9 @@
/* Define to the soname of the libhal library. */
#undef SONAME_LIBHAL
+/* Define to the soname of the libicns library. */
+#undef SONAME_LIBICNS
+
/* Define to the soname of the libjack library. */
#undef SONAME_LIBJACK
More information about the wine-cvs
mailing list