diff options
author | Jim Blandy <jimb@red-bean.com> | 1999-10-05 22:35:06 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1999-10-05 22:35:06 +0000 |
commit | 2b9fe19fa091cd75e3df59c92a6c2828354351b2 (patch) | |
tree | 7856fd0a51bf76ed96ccff1bed69aaed0c90157d /guile-config | |
parent | 37ace88a91e3ae9dbdd2ae3d27e7df39c8555453 (diff) | |
download | guile-2b9fe19fa091cd75e3df59c92a6c2828354351b2.tar.gz |
* guile.m4: Moved here from top-level directory; see the ChangeLog
entry there.
* Makefile.am (aclocaldir, aclocal_DATA): New variables, ensuring
that guile.m4 gets installed.
Diffstat (limited to 'guile-config')
-rw-r--r-- | guile-config/Makefile.am | 7 | ||||
-rw-r--r-- | guile-config/guile.m4 | 76 |
2 files changed, 82 insertions, 1 deletions
diff --git a/guile-config/Makefile.am b/guile-config/Makefile.am index 4d607a4ba..5babf3ba6 100644 --- a/guile-config/Makefile.am +++ b/guile-config/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with Automake to create Makefile.in ## Jim Blandy <jimb@red-bean.com> --- September 1997 ## -## Copyright (C) 1998 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## @@ -24,6 +24,11 @@ bin_SCRIPTS=guile-config CLEANFILES=guile-config EXTRA_DIST=guile-config.in +## FIXME: in the future there will be direct automake support for +## doing this. When that happens, switch over. +aclocaldir = $(datadir)/aclocal +aclocal_DATA = guile.m4 + ## We use @-...-@ as the substitution brackets here, instead of the ## usual @...@, so autoconf doesn't go and substitute the values ## directly into the left-hand sides of the sed substitutions. *sigh* diff --git a/guile-config/guile.m4 b/guile-config/guile.m4 new file mode 100644 index 000000000..d8958cb1b --- /dev/null +++ b/guile-config/guile.m4 @@ -0,0 +1,76 @@ +dnl Automake macros for working with Guile. +dnl +dnl Copyright (C) 1998 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this software; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +dnl Boston, MA 02111-1307 USA +dnl +dnl As a special exception, the Free Software Foundation gives permission +dnl for additional uses of the text contained in its release of GUILE. +dnl +dnl The exception is that, if you link the GUILE library with other files +dnl to produce an executable, this does not by itself cause the +dnl resulting executable to be covered by the GNU General Public License. +dnl Your use of that executable is in no way restricted on account of +dnl linking the GUILE library code into it. +dnl +dnl This exception does not however invalidate any other reasons why +dnl the executable file might be covered by the GNU General Public License. +dnl +dnl This exception applies only to the code released by the +dnl Free Software Foundation under the name GUILE. If you copy +dnl code from other Free Software Foundation releases into a copy of +dnl GUILE, as the General Public License permits, the exception does +dnl not apply to the code that you add in this way. To avoid misleading +dnl anyone as to the status of such modified files, you must delete +dnl this exception notice from them. +dnl +dnl If you write modifications of your own for GUILE, it is your choice +dnl whether to permit this exception to apply to your modifications. +dnl If you do not wish that, delete this exception notice. + + +dnl GUILE_FLAGS --- set flags for compiling and linking with Guile +dnl +dnl This macro runs the `guile-config' script, installed with Guile, +dnl to find out where Guile's header files and libraries are +dnl installed. It sets two variables, marked for substitution, as +dnl by AC_SUBST. +dnl +dnl GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build +dnl code that uses Guile header files. This is almost +dnl always just a -I flag. +dnl +dnl GUILE_LDFLAGS --- flags to pass to the linker to link a +dnl program against Guile. This includes `-lguile' for +dnl the Guile library itself, any libraries that Guile +dnl itself requires (like -lqthreads), and so on. It may +dnl also include a -L flag to tell the compiler where to +dnl find the libraries. + +AC_DEFUN([GUILE_FLAGS],[ +## The GUILE_FLAGS macro. + ## First, let's just see if we can find Guile at all. + AC_MSG_CHECKING(for Guile) + guile-config link > /dev/null || { + echo "configure: cannot find guile-config; is Guile installed?" 1>&2 + exit 1 + } + GUILE_CFLAGS="`guile-config compile`" + GUILE_LDFLAGS="`guile-config link`" + AC_SUBST(GUILE_CFLAGS) + AC_SUBST(GUILE_LDFLAGS) + AC_MSG_RESULT(yes) +]) |