On Fri, Aug 20, 2004 at 09:32:35AM -0400, Chris Ross wrote:
> Dan Espen wrote:
> >If the #define'd stuff is only used on Solaris, when the header
> >isn't there, and the library support is there,  I'd say that was
> >OK.
> 
>   Yup.  That's how it's done.  Only if the libXinerama stuff
> isn't found will it look for Solaris' calls, and only if those
> are found will it look for the header.  If the header is found,
> the few lines (to replace the header) I added don't get used.
> 
>   The following should be the full diff against CVS HEAD for
> this patch.  Thanks for all your help!
> 
>                              - Chris
> 
> 

> Index: configure.in
> ===================================================================
> RCS file: /home/cvs/fvwm/fvwm/configure.in,v
> retrieving revision 1.294
> diff -u -u -r1.294 configure.in
> --- configure.in      23 May 2004 16:20:23 -0000      1.294
> +++ configure.in      20 Aug 2004 13:26:58 -0000
> @@ -298,8 +298,18 @@
>    $UNSET ac_cv_lib_Xinerama_XineramaIsActive
>    AC_CHECK_LIB(Xinerama, XineramaIsActive,
>      with_xinerama=yes; Xinerama_LIBS=-lXinerama; AC_DEFINE(HAVE_XINERAMA),
> +    AC_CHECK_LIB(Xext, XineramaGetState,
> +      [ AC_DEFINE(HAVE_XINERAMA) AC_DEFINE(HAVE_SOLARIS_XINERAMA)
> +      with_xinerama=yes; Xinerama_LIBS=-lXext
> +      my_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$X_CPPFLAGS $CPPFLAGS"
> +      my_hdr="X11/extensions/xinerama.h"
> +      AC_CHECK_HEADER($my_hdr, AC_DEFINE(HAVE_SOLARIS_XINERAMA_H)
> +     problem_xinerama=" (Using Solaris Xinerama calls)",
> +     problem_xinerama=" (Failed to find Sun's $my_hdr)")
> +      CPPFLAGS="$my_CPPFLAGS"],
>      with_xinerama=no; Xinerama_LIBS=
>      problem_xinerama=": Failed to detect libXinerama",
> +    [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]),
>      [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
>  fi
>  AC_SUBST(Xinerama_LIBS)

Note that this nesting of AC_CHECK_LIB calls did not work with my
autoconf/automake versions.  I have split it in two separate
calls.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

Attachment: pgpNYa7L80UQF.pgp
Description: PGP signature

Reply via email to