[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoconf test for GNUstep libraries/frameworks
From: |
David Ayers |
Subject: |
autoconf test for GNUstep libraries/frameworks |
Date: |
Tue, 30 May 2006 22:33:11 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20060423) |
Hello,
I'm looking for the canonical autoconf test to determine whether a
GNUstep library/framework is installed. Specifically I would like to
test for -gui and libGorm. (Well actually I might need a test that also
checks for AppKit/InterfaceBuilder at one point in time but right now
-gui and libGrom would suffice).
I've been offered an implementation of an m4 file (see attachment) but
this currently would have to augmented with the -make functionality of
probing for those suffixes (_d/_p/?) which we still seem to generate for
debug and profiled libraries.
I would like to avoid replicating that -make logic in m4 so I'd really
welcome an alternative.
Cheers,
David
dnl AC_CHECK_LIB_GORM([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_CHECK_LIB_GORM,[OLD_CFLAGS=$CFLAGS
CFLAGS="-xobjective-c"
PREFIX="-I"
SUFFIX="Library/Headers/"
OLD_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PREFIX$GNUSTEP_SYSTEM_ROOT/$SUFFIX
$PREFIX$GNUSTEP_LOCAL_ROOT/$SUFFIX $PREFIX$GNUSTEP_NETWORK_ROOT/$SUFFIX
$PREFIX$GNUSTEP_USER_ROOT/$SUFFIX"
OLD_LDFLAGS="$LD_FLAGS"
PREFIX="-L"
SUFFIX="Library/Libraries/"
LDFLAGS="$LDFLAGS $PREFIX$GNUSTEP_SYSTEM_ROOT/$SUFFIX
$PREFIX$GNUSTEP_LOCAL_ROOT/$SUFFIX $PREFIX$GNUSTEP_NETWORK_ROOT/$SUFFIX
$PREFIX$GNUSTEP_USER_ROOT/$SUFFIX"
OLD_LIBS="$LIBS"
LIBS="-lGorm"
AC_MSG_CHECKING([for libGorm])
AC_LINK_IFELSE(
AC_LANG_PROGRAM(
[[#include <Foundation/Foundation.h>
#include <InterfaceBuilder/InterfaceBuilder.h>]],
[[[[IBPalette class]];]]),
$1;
AC_MSG_RESULT(yes),
$2;
AC_MSG_RESULT(no))
LIBS="$OLD_LIBS"
CPPFLAGS="$OLD_CPPFLAGS"
LDFLAGS="$OLD_LDFLAGS"
CFLAGS="$OLD_CFLAGS"])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- autoconf test for GNUstep libraries/frameworks,
David Ayers <=