configure: Check for libicns.
authorDamjan Jovanovic <damjan.jov@gmail.com>
Sun, 22 Aug 2010 17:12:45 +0000 (19:12 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 23 Aug 2010 11:51:32 +0000 (13:51 +0200)
configure
configure.ac
include/config.h.in

index 22fe16fabae944041f341da1052332122d3aec95..d61a5b96bf65e7f00d84286f459b5c2cf8faf1c5 100755 (executable)
--- 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
index 5b8a199accb68476ee929f273e2de6153ddf291a..b02c7aae171259b984d9f395b03c361ac7a9f54a 100644 (file)
@@ -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
index f365fca47e9e54e344eda048056cd096a5d09630..98a951f2dd1b3be8c6f8c2445e6e3f0512d56fbd 100644 (file)
 /* 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
 
 /* 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