Sources placed under CVS control.
[become] / aclocal.m4
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..16a9ca8
--- /dev/null
@@ -0,0 +1,60 @@
+dnl -*-fundamental-*-
+dnl
+dnl $Id: aclocal.m4,v 1.1 1997/08/04 10:22:10 mdw Exp $
+dnl
+dnl Configuration macros for `become'
+dnl
+dnl (c) 1997 Mark Wooding
+dnl
+
+dnl----- Licensing notice ---------------------------------------------------
+dnl 
+dnl This file is part of `become'
+dnl 
+dnl `Become' 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 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl `Become' 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 `become'; if not, write to the Free Software Foundation,
+dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+dnl----- Revision history ---------------------------------------------------
+dnl
+dnl $Log: aclocal.m4,v $
+dnl Revision 1.1  1997/08/04 10:22:10  mdw
+dnl Sources placed under CVS control.
+dnl
+
+dnl MDW_CHECK_MANYLIBS(FUNC, LIBS, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+dnl Tries to find FUNC in one of the space-separated libraries given in LIBS.
+dnl The first one to match is added to the LIBS variable.
+
+AC_DEFUN(MDW_CHECK_MANYLIBS,[
+AC_CACHE_CHECK([for library containing $1], [mdw_cv_lib_$1],
+[mdw_save_LIBS="$LIBS"
+mdw_cv_lib_$1="no"
+AC_TRY_LINK(,[$1()], [mdw_cv_lib_$1="none required"])
+test "$mdw_cv_lib_$1" = "no" && for i in $2; do
+LIBS="-l$i $mdw_save_LIBS"
+AC_TRY_LINK(,[$1()],
+[mdw_cv_lib_$1="-l$i"
+break])
+done
+LIBS="$mdw_save_LIBS"])
+if test "$mdw_cv_lib_$1" != "no"; then
+  test "$mdw_cv_lib_$1" = "none required" || LIBS="$mdw_cv_lib_$1 $LIBS"
+  $3
+else
+  :
+  $4
+fi])
+
+dnl----- That's all, folks --------------------------------------------------