Fix autoconf to have a new WINE_TRY_SHLIB_FLAGS function that tests if
the provided flags can be used to link a shared library.
Added test for building shared libs on HP-UX with gcc.
diff --git a/aclocal.m4 b/aclocal.m4
index 76813bd..76b33bd 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -68,6 +68,16 @@
AC_TRY_LINK([],[],[$2],[$3])
CFLAGS=$ac_wine_try_cflags_saved])
+dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
+dnl
+dnl Usage: WINE_TRY_SHLIB_FLAGS(flags,[action-if-yes,[action-if-no]])
+dnl
+AC_DEFUN([WINE_TRY_SHLIB_FLAGS],
+[ac_wine_try_cflags_saved=$CFLAGS
+CFLAGS="$CFLAGS $1"
+AC_LINK_IFELSE([void myfunc() {}],[$2],[$3])
+CFLAGS=$ac_wine_try_cflags_saved])
+
dnl **** Check whether we need to define a symbol on the compiler command line ****
dnl
dnl Usage: WINE_CHECK_DEFINE(name),[action-if-yes,[action-if-no]])