forked from rose-compiler/rose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pkg.m4 macro file to aclocal directory (for libffi).
git-svn-id: file:https:///usr/casc/overture/ROSE/svn/ROSE/trunk/ROSE@7443 a27c51de-2d2b-4d1b-a6e8-f7f87814f453
- Loading branch information
dquinlan
committed
Sep 21, 2009
1 parent
5d4e5ca
commit cca430c
Showing
3 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) | ||
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page | ||
dnl also defines GSTUFF_PKG_ERRORS on error | ||
AC_DEFUN([PKG_CHECK_MODULES], [ | ||
succeeded=no | ||
if test -z "$PKG_CONFIG"; then | ||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
fi | ||
if test "$PKG_CONFIG" = "no" ; then | ||
echo "*** The pkg-config script could not be found. Make sure it is" | ||
echo "*** in your path, or set the PKG_CONFIG environment variable" | ||
echo "*** to the full path to pkg-config." | ||
echo "*** Or see http:https://www.freedesktop.org/software/pkgconfig to get pkg-config." | ||
else | ||
PKG_CONFIG_MIN_VERSION=0.9.0 | ||
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | ||
AC_MSG_CHECKING(for $2) | ||
if $PKG_CONFIG --exists "$2" ; then | ||
AC_MSG_RESULT(yes) | ||
succeeded=yes | ||
AC_MSG_CHECKING($1_CFLAGS) | ||
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"` | ||
AC_MSG_RESULT($$1_CFLAGS) | ||
AC_MSG_CHECKING($1_LIBS) | ||
$1_LIBS=`$PKG_CONFIG --libs "$2"` | ||
AC_MSG_RESULT($$1_LIBS) | ||
else | ||
$1_CFLAGS="" | ||
$1_LIBS="" | ||
## If we have a custom action on failure, don't print errors, but | ||
## do set a variable so people can do so. | ||
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | ||
ifelse([$4], ,echo $$1_PKG_ERRORS,) | ||
fi | ||
AC_SUBST($1_CFLAGS) | ||
AC_SUBST($1_LIBS) | ||
else | ||
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | ||
echo "*** See http:https://www.freedesktop.org/software/pkgconfig" | ||
fi | ||
fi | ||
if test $succeeded = yes; then | ||
ifelse([$3], , :, [$3]) | ||
else | ||
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) | ||
fi | ||
]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
AC_DEFUN([ROSE_SUPPORT_LIBFFI], | ||
[ | ||
# DQ (9/19/2009): This fails on OSX (ninjai.llnl.gov) | ||
# PKG_CHECK_MODULES([LIBFFI],[libffi],[with_libffi=yes],[with_libffi=no]) | ||
# DQ (9/21/2009): Added pkg.m4 to local ROSE/aclocal | ||
# DQ (9/19/2009): This fails on OSX (ninjai.llnl.gov) (added by Peter to support ROSE interpreter). | ||
PKG_CHECK_MODULES([LIBFFI],[libffi],[with_libffi=yes],[with_libffi=no]) | ||
# DQ (9/19/2009): This fails on Mac OSX (this variable is needed | ||
# for an automake conditional that will be built in configure.in) | ||
with_libffi=no | ||
# with_libffi=no | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters