Alexandre Julliard : configure: Add check for libkstat on Solaris.

Alexandre Julliard julliard at winehq.org
Fri Mar 6 09:49:29 CST 2009


Module: wine
Branch: master
Commit: de1d7fbe9889ebdc47c8c70d96af829f7a15c543
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=de1d7fbe9889ebdc47c8c70d96af829f7a15c543

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar  5 18:45:32 2009 +0100

configure: Add check for libkstat on Solaris.

---

 configure           |   82 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac        |    9 +++++
 include/config.h.in |    6 ++++
 3 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index f182c34..2d77fe1 100755
--- a/configure
+++ b/configure
@@ -661,6 +661,7 @@ CRTLIBS
 LDPATH
 BUILTINFLAG
 EXTRACFLAGS
+LIBKSTAT
 FONTCONFIGINCL
 CUPSINCL
 AUDIOIOLIBS
@@ -6074,6 +6075,7 @@ done
 
 
 
+
 for ac_header in \
 	AudioUnit/AudioUnit.h \
 	Carbon/Carbon.h \
@@ -6099,6 +6101,7 @@ for ac_header in \
 	io.h \
 	jack/jack.h \
 	jpeglib.h \
+	kstat.h \
 	lber.h \
 	lcms.h \
 	lcms/lcms.h \
@@ -17087,6 +17090,85 @@ esac
 fi
 
 
+if test "$ac_cv_header_kstat_h" = "yes"
+then
+    { $as_echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
+$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
+if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkstat  $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 kstat_open ();
+int
+main ()
+{
+return kstat_open ();
+  ;
+  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$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
+  $as_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 && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_kstat_kstat_open=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_kstat_kstat_open=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
+$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
+if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBKSTAT 1
+_ACEOF
+
+                  LIBKSTAT="-lkstat"
+
+fi
+
+fi
+
 { $as_echo "$as_me:$LINENO: checking for -lodbc" >&5
 $as_echo_n "checking for -lodbc... " >&6; }
 if test "${ac_cv_lib_soname_odbc+set}" = set; then
diff --git a/configure.ac b/configure.ac
index c5ac0db..f70222f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,7 @@ AC_CHECK_HEADERS(\
 	io.h \
 	jack/jack.h \
 	jpeglib.h \
+	kstat.h \
 	lber.h \
 	lcms.h \
 	lcms/lcms.h \
@@ -1296,6 +1297,14 @@ fi
 WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],
                  [libpng ${notice_platform}development files not found, PNG won't be supported.])
 
+dnl **** Check for libkstat ****
+if test "$ac_cv_header_kstat_h" = "yes"
+then
+    AC_CHECK_LIB(kstat,kstat_open,
+                 [AC_DEFINE(HAVE_LIBKSTAT, 1, [Define to 1 if you have the `kstat' library (-lkstat).])
+                  AC_SUBST(LIBKSTAT,"-lkstat")])
+fi
+
 dnl **** Check for libodbc ****
 WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])])
 
diff --git a/include/config.h.in b/include/config.h.in
index 575bb8e..f3bd775 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -273,6 +273,9 @@
 /* Define to 1 if you have the `kqueue' function. */
 #undef HAVE_KQUEUE
 
+/* Define to 1 if you have the <kstat.h> header file. */
+#undef HAVE_KSTAT_H
+
 /* Define to 1 if you have the <lber.h> header file. */
 #undef HAVE_LBER_H
 
@@ -324,6 +327,9 @@
 /* Define to 1 if you have the `i386' library (-li386). */
 #undef HAVE_LIBI386
 
+/* Define to 1 if you have the `kstat' library (-lkstat). */
+#undef HAVE_LIBKSTAT
+
 /* Define to 1 if you have the `ossaudio' library (-lossaudio). */
 #undef HAVE_LIBOSSAUDIO
 




More information about the wine-cvs mailing list