+1998-10-24 Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+ * acgeneral.m4 (AC_LANG_FORTRAN77): Remove [] (i.e. the m4 quotes)
+ since it was confusing the testsuite. Also make `f77' the default
+ for FC, otherwise the testsuite fails.
+
+ * autoconf.texi (Fortran 77 Compiler Characteristics): Added new
+ node documenting the new AC_F77_LIBRARY_LDFLAGS macro.
+
+ * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): New macro to determine
+ the linker flags (e.g. `-L' and `-l') for the Fortran 77 intrinsic
+ and run-time libraries.
+
1998-10-24 Ben Elliston <bje@cygnus.com>
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): New macro. Detects the
types of formal arguments to select(). Contributed by Lars Hecking
<lhecking@nmrc.ucc.ie>.
-
+
* acconfig.h (SELECT_TYPE_ARG1): Add.
(SELECT_TYPE_ARG234): Likewise.
(SELECT_TYPE_ARG5): Likewise.
])
dnl AC_LANG_FORTRAN77()
-AC_DEFUN([AC_LANG_FORTRAN77],
+AC_DEFUN(AC_LANG_FORTRAN77,
[define([AC_LANG], [FORTRAN77])dnl
ac_ext=f
-ac_compile='$FC $FFLAGS -c conftest.$ac_ext 1>&AC_FD_CC'
-ac_link='$FC $FFLAGS $LDFLAGS -c conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC'
+ac_compile='${FC-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
+ac_link='${FC-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
cross_compiling=$ac_cv_prog_fc_cross
])
dnl Macros that test for specific features.
dnl This file is part of Autoconf.
-dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+dnl Copyright (C) 1992, 93, 94, 95, 96, 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
AC_LANG_SAVE
AC_LANG_FORTRAN77
AC_TRY_COMPILER(dnl
-[ program conftest
- end
+[ program conftest
+ end
], ac_cv_prog_fc_works, ac_cv_prog_fc_cross)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_fc_works)
ac_objext=$ac_cv_objext
AC_SUBST(OBJEXT)])
+dnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77
+dnl intrinsic and run-time libraries that are required to successfully
+dnl link a Fortran 77 program or shared library. The output variable
+dnl FLIBS is set to these flags.
+dnl
+dnl This macro is intended to be used in those situations when it is
+dnl necessary to mix, e.g. C++ and Fortran 77, source code into a single
+dnl program or shared library.
+dnl
+dnl For example, if object files from a C++ and Fortran 77 compiler must
+dnl be linked together, then the C++ compiler/linker must be used for
+dnl linking (since special C++-ish things need to happen at link time
+dnl like calling global constructors, instantiating templates, enabling
+dnl exception support, etc.).
+dnl
+dnl However, the Fortran 77 intrinsic and run-time libraries must be
+dnl linked in as well, but the C++ compiler/linker doesn't know how to
+dnl add these Fortran 77 libraries. Hence, the macro
+dnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77
+dnl libraries.
+dnl
+dnl This macro was packaged in its current form by Matthew D. Langston
+dnl <langston@SLAC.Stanford.EDU>. However, nearly all of this macro
+dnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4',
+dnl and full credit should go to John W. Eaton for writing this
+dnl extremely useful macro. Thank you John.
+dnl
+dnl AC_F77_LIBRARY_LDFLAGS()
+AC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
+[AC_MSG_CHECKING([for Fortran libraries])
+AC_REQUIRE([AC_PROG_FC])
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_CACHE_VAL(ac_cv_flibs,
+[changequote(, )dnl
+dnl Write a minimal program and compile it with -v. I don't know what
+dnl to do if your compiler doesn't have -v...
+echo " END" > conftest.f
+foutput=`${FC} -v -o conftest conftest.f 2>&1`
+dnl
+dnl The easiest thing to do for xlf output is to replace all the commas
+dnl with spaces. Try to only do that if the output is really from xlf,
+dnl since doing that causes problems on other systems.
+dnl
+xlf_p=`echo $foutput | grep xlfentry`
+if test -n "$xlf_p"; then
+ foutput=`echo $foutput | sed 's/,/ /g'`
+fi
+dnl
+ld_run_path=`echo $foutput | \
+ sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
+dnl
+dnl We are only supposed to find this on Solaris systems...
+dnl Uh, the run path should be absolute, shouldn't it?
+dnl
+case "$ld_run_path" in
+ /*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
+ else
+ ld_run_path="-R $ld_run_path"
+ fi
+ ;;
+ *)
+ ld_run_path=
+ ;;
+esac
+dnl
+flibs=
+lflags=
+dnl
+dnl If want_arg is set, we know we want the arg to be added to the list,
+dnl so we don't have to examine it.
+dnl
+want_arg=
+dnl
+for arg in $foutput; do
+ old_want_arg=$want_arg
+ want_arg=
+dnl
+dnl None of the options that take arguments expect the argument to
+dnl start with a -, so pretend we didn't see anything special.
+dnl
+ if test -n "$old_want_arg"; then
+ case "$arg" in
+ -*)
+ old_want_arg=
+ ;;
+ esac
+ fi
+ case "$old_want_arg" in
+ '')
+ case $arg in
+ /*.a)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ lflags="$lflags $arg"
+ fi
+ ;;
+ -bI:*)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ if test "$ac_cv_prog_gcc" = yes; then
+ lflags="$lflags -Xlinker $arg"
+ else
+ lflags="$lflags $arg"
+ fi
+ fi
+ ;;
+ -lang* | -lcrt0.o | -lc | -lgcc)
+ arg=
+ ;;
+ -[lLR])
+ want_arg=$arg
+ arg=
+ ;;
+ -[lLR]*)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ case "$arg" in
+ -lkernel32)
+ case "$canonical_host_type" in
+ *-*-cygwin32)
+ arg=
+ ;;
+ *)
+ lflags="$lflags $arg"
+ ;;
+ esac
+ ;;
+ -lm)
+ ;;
+ *)
+ lflags="$lflags $arg"
+ ;;
+ esac
+ fi
+ ;;
+ -u)
+ want_arg=$arg
+ arg=
+ ;;
+ -Y)
+ want_arg=$arg
+ arg=
+ ;;
+ *)
+ arg=
+ ;;
+ esac
+ ;;
+ -[lLR])
+ arg="$old_want_arg $arg"
+ ;;
+ -u)
+ arg="-u $arg"
+ ;;
+ -Y)
+dnl
+dnl Should probably try to ensure unique directory options here too.
+dnl This probably only applies to Solaris systems, and then will only
+dnl work with gcc...
+dnl
+ arg=`echo $arg | sed -e 's%^P,%%'`
+ SAVE_IFS=$IFS
+ IFS=:
+ list=
+ for elt in $arg; do
+ list="$list -L$elt"
+ done
+ IFS=$SAVE_IFS
+ arg="$list"
+ ;;
+ esac
+dnl
+ if test -n "$arg"; then
+ flibs="$flibs $arg"
+ fi
+done
+if test -n "$ld_run_path"; then
+ flibs_result="$ld_run_path $flibs"
+else
+ flibs_result="$flibs"
+fi
+changequote([, ])dnl
+ac_cv_flibs="$flibs_result"])
+FLIBS="$ac_cv_flibs"
+AC_SUBST(FLIBS)dnl
+AC_MSG_RESULT($FLIBS)
+])
+
dnl ### Checks for operating system services
@c Define a macro index that @@defmac doesn't write to.
@defcodeindex ma
-@node Top, Introduction, , (dir)
+@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@ifinfo
* Preprocessor Symbol Index:: Index of C preprocessor symbols defined.
* Macro Index:: Index of Autoconf macros.
+@detailmenu
--- The Detailed Node Listing ---
Making @code{configure} Scripts
* Header Files:: Header files that might be missing.
* Structures:: Structures or members that might be missing.
* Typedefs:: @code{typedef}s that might be missing.
-* Compiler Characteristics:: C compiler or machine architecture features.
+* C Compiler Characteristics::
+* Fortran 77 Compiler Characteristics::
* System Services:: Operating system services.
* UNIX Variants:: Special kludges for specific UNIX variants.
* Macro Definitions:: Basic format of an Autoconf macro.
* Macro Names:: What to call your new macros.
* Quoting:: Protecting macros from unwanted expansion.
-* Dependencies Between Macros:: What to do when macros depend on other macros.
+* Dependencies Between Macros:: What to do when macros depend on other macros.
Dependencies Between Macros
* Leviticus:: The priestly code of portability arrives.
* Numbers:: Growth and contributors.
* Deuteronomy:: Approaching the promises of easy configuration.
+
+@end detailmenu
@end menu
@node Introduction, Making configure Scripts, Top, Top
* Invoking autoreconf:: Remaking multiple @code{configure} scripts.
@end menu
-@node Writing configure.in, Invoking autoscan, , Making configure Scripts
+@node Writing configure.in, Invoking autoscan, Making configure Scripts, Making configure Scripts
@section Writing @file{configure.in}
To produce a @code{configure} script for a software package, create a
Print the version number of Autoconf and exit.
@end table
-@node Invoking autoreconf, , Invoking autoconf, Making configure Scripts
+@node Invoking autoreconf, , Invoking autoconf, Making configure Scripts
@section Using @code{autoreconf} to Update @code{configure} Scripts
If you have a lot of Autoconf-generated @code{configure} scripts, the
* Versions:: Version numbers in @code{configure}.
@end menu
-@node Input, Output, , Setup
+@node Input, Output, Setup, Setup
@section Finding @code{configure} Input
Every @code{configure} script must call @code{AC_INIT} before doing
* Automatic Remaking:: Makefile rules for configuring.
@end menu
-@node Preset Output Variables, Build Directories, , Makefile Substitutions
+@node Preset Output Variables, Build Directories, Makefile Substitutions, Makefile Substitutions
@subsection Preset Output Variables
Some output variables are preset by the Autoconf macros. Some of the
$(MAKEINFO) $(srcdir)/time.texinfo
@end example
-@node Automatic Remaking, , Build Directories, Makefile Substitutions
+@node Automatic Remaking, , Build Directories, Makefile Substitutions
@subsection Automatic Remaking
You can put rules like the following in the top-level @file{Makefile.in}
* Invoking autoheader:: How to create configuration templates.
@end menu
-@node Header Templates, Invoking autoheader, , Configuration Headers
+@node Header Templates, Invoking autoheader, Configuration Headers, Configuration Headers
@subsection Configuration Header Templates
Your distribution should contain a template file that looks as you want
@end group
@end example
-@node Invoking autoheader, , Header Templates, Configuration Headers
+@node Invoking autoheader, , Header Templates, Configuration Headers
@subsection Using @code{autoheader} to Create @file{config.h.in}
The @code{autoheader} program can create a template file of C
set the prefix to @file{/usr/local/gnu}.
@end defmac
-@node Versions, , Default Prefix, Setup
+@node Versions, , Default Prefix, Setup
@section Version Numbers in @code{configure}
The following macros manage version numbers for @code{configure}
* Header Files:: Header files that might be missing.
* Structures:: Structures or members that might be missing.
* Typedefs:: @code{typedef}s that might be missing.
-* Compiler Characteristics:: C compiler or machine architecture features.
+* C Compiler Characteristics::
+* Fortran 77 Compiler Characteristics::
* System Services:: Operating system services.
* UNIX Variants:: Special kludges for specific UNIX variants.
@end menu
-@node Alternative Programs, Libraries, , Existing Tests
+@node Alternative Programs, Libraries, Existing Tests, Existing Tests
@section Alternative Programs
These macros check for the presence or behavior of particular programs.
* Generic Programs:: How to find other programs.
@end menu
-@node Particular Programs, Generic Programs, , Alternative Programs
+@node Particular Programs, Generic Programs, Alternative Programs, Alternative Programs
@subsection Particular Program Checks
These macros check for particular programs---whether they exist, and
to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}.
@end defmac
-@node Generic Programs, , Particular Programs, Alternative Programs
+@node Generic Programs, , Particular Programs, Alternative Programs
@subsection Generic Program Checks
These macros are used to find programs not covered by the particular
* Generic Functions:: How to find other functions.
@end menu
-@node Particular Functions, Generic Functions, , Library Functions
+@node Particular Functions, Generic Functions, Library Functions, Library Functions
@subsection Particular Function Checks
These macros check for particular C functions---whether they exist, and
@code{HAVE_WAIT3}.
@end defmac
-@node Generic Functions, , Particular Functions, Library Functions
+@node Generic Functions, , Particular Functions, Library Functions
@subsection Generic Function Checks
These macros are used to find functions not covered by the particular
* Generic Headers:: How to find other headers.
@end menu
-@node Particular Headers, Generic Headers, , Header Files
+@node Particular Headers, Generic Headers, Header Files, Header Files
@subsection Particular Header Checks
These macros check for particular system header files---whether they
example for @code{AC_HEADER_STDC}.
@end defmac
-@node Generic Headers, , Particular Headers, Header Files
+@node Generic Headers, , Particular Headers, Header Files
@subsection Generic Header Checks
These macros are used to find system header files not covered by the
external array @code{tzname} is found, define @code{HAVE_TZNAME}.
@end defmac
-@node Typedefs, Compiler Characteristics, Structures, Existing Tests
+@node Typedefs, C Compiler Characteristics, Structures, Existing Tests
@section Typedefs
The following macros check for C typedefs. If there is no macro
* Generic Typedefs:: How to find other types.
@end menu
-@node Particular Typedefs, Generic Typedefs, , Typedefs
+@node Particular Typedefs, Generic Typedefs, Typedefs, Typedefs
@subsection Particular Typedef Checks
These macros check for particular C typedefs in @file{sys/types.h} and
@code{gid_t} to be @code{int}.
@end defmac
-@node Generic Typedefs, , Particular Typedefs, Typedefs
+@node Generic Typedefs, , Particular Typedefs, Typedefs
@subsection Generic Typedef Checks
This macro is used to check for typedefs not covered by the particular
@samp{unsigned}.
@end defmac
-@node Compiler Characteristics, System Services, Typedefs, Existing Tests
-@section Compiler Characteristics
+@node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests
+@section C Compiler Characteristics
The following macros check for C compiler or machine architecture
features. To check for characteristics not listed here, use
@samp{AC_CHECK_SIZEOF(long)} instead.
@end defmac
-@node System Services, UNIX Variants, Compiler Characteristics, Existing Tests
+
+@node Fortran 77 Compiler Characteristics, System Services, C Compiler Characteristics, Existing Tests
+@section Fortran 77 Compiler Characteristics
+
+The following macros check for Fortran 77 compiler characteristics. To
+check for characteristics not listed here, use @code{AC_TRY_COMPILE}
+(@pxref{Examining Syntax}) or @code{AC_TRY_RUN} (@pxref{Run Time}),
+making sure to first set the current lanuage to Fortran 77
+@code{AC_LANG_FORTRAN77} (@pxref{Language Choice}).
+
+@defmac AC_F77_LIBRARY_LDFLAGS
+@maindex F77_LIBRARY_LDFLAGS
+@ovindex FLIBS
+Determine the linker flags (e.g. @samp{-L} and @samp{-l}) for the
+@dfn{Fortran 77 intrinsic and run-time libraries} that are required to
+successfully link a Fortran 77 program or shared library. The output
+variable @code{FLIBS} is set to these flags.
+
+This macro is intended to be used in those situations when it is
+necessary to mix, e.g. C++ and Fortran 77 source code into a single
+program or shared library (@pxref{Mixing Fortran 77 With C and C++, , ,
+automake, GNU Automake}).
+
+For example, if object files from a C++ and Fortran 77 compiler must be
+linked together, then the C++ compiler/linker must be used for linking
+(since special C++-ish things need to happen at link time like calling
+global constructors, instantiating templates, enabling exception
+support, etc.).
+
+However, the Fortran 77 intrinsic and run-time libraries must be linked
+in as well, but the C++ compiler/linker doesn't know by default how to
+add these Fortran 77 libraries. Hence, the macro
+@code{AC_F77_LIBRARY_LDFLAGS} was created to determine these Fortran 77
+libraries.
+@end defmac
+
+
+@node System Services, UNIX Variants, Fortran 77 Compiler Characteristics, Existing Tests
@section System Services
The following macros check for operating system services or capabilities.
by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}.
@end defmac
-@node UNIX Variants, , System Services, Existing Tests
+@node UNIX Variants, , System Services, Existing Tests
@section UNIX Variants
The following macros check for certain operating systems that need
* Language Choice:: Selecting which language to use for testing.
@end menu
-@node Examining Declarations, Examining Syntax, , Writing Tests
+@node Examining Declarations, Examining Syntax, Writing Tests, Writing Tests
@section Examining Declarations
The macro @code{AC_TRY_CPP} is used to check whether particular header
* Test Functions:: Avoiding pitfalls in test programs.
@end menu
-@node Test Programs, Guidelines, , Run Time
+@node Test Programs, Guidelines, Run Time, Run Time
@subsection Running Test Programs
Use the following macro if you need to test run-time behavior of the
@code{configure} script cleans up by running @samp{rm -rf conftest*}
after running test programs and if the script is interrupted.
-@node Test Functions, , Guidelines, Run Time
+@node Test Functions, , Guidelines, Run Time
@subsection Test Functions
Function declarations in test programs should have a prototype
@end group
@end example
-@node Language Choice, , Multiple Cases, Writing Tests
+@node Language Choice, , Multiple Cases, Writing Tests
@section Language Choice
Packages that use both C and C++ need to test features of both
* Printing Messages:: Notifying users of progress or problems.
@end menu
-@node Defining Symbols, Setting Output Variables, , Results
+@node Defining Symbols, Setting Output Variables, Results, Results
@section Defining C Preprocessor Symbols
A common action to take in response to a feature test is to define a C
* Cache Files:: Files @code{configure} uses for caching.
@end menu
-@node Cache Variable Names, Cache Files, , Caching Results
+@node Cache Variable Names, Cache Files, Caching Results, Caching Results
@subsection Cache Variable Names
The names of cache variables should have the following format:
Usually, their values will be boolean (@samp{yes} or @samp{no}) or the
names of files or functions; so this is not an important restriction.
-@node Cache Files, , Cache Variable Names, Caching Results
+@node Cache Files, , Cache Variable Names, Caching Results
@subsection Cache Files
A cache file is a shell script that caches the results of configure
transparently, as long as the same C compiler is used every time
(@pxref{Site Defaults}).
-@node Printing Messages, , Caching Results, Results
+@node Printing Messages, , Caching Results, Results
@section Printing Messages
@code{configure} scripts need to give users running them several kinds
* Macro Definitions:: Basic format of an Autoconf macro.
* Macro Names:: What to call your new macros.
* Quoting:: Protecting macros from unwanted expansion.
-* Dependencies Between Macros:: What to do when macros depend on other macros.
+* Dependencies Between Macros:: What to do when macros depend on other macros.
@end menu
-@node Macro Definitions, Macro Names, , Writing Macros
+@node Macro Definitions, Macro Names, Writing Macros, Writing Macros
@section Macro Definitions
@maindex DEFUN
unexpanded macros. The @code{autoconf} program checks for this problem
by doing @samp{grep AC_ configure}.
-@node Dependencies Between Macros, , Quoting, Writing Macros
+@node Dependencies Between Macros, , Quoting, Writing Macros
@section Dependencies Between Macros
Some Autoconf macros depend on other macros having been called first in
* Obsolete Macros:: Warning about old ways of doing things.
@end menu
-@node Prerequisite Macros, Suggested Ordering, , Dependencies Between Macros
+@node Prerequisite Macros, Suggested Ordering, Dependencies Between Macros, Dependencies Between Macros
@subsection Prerequisite Macros
A macro that you write might need to use values that have previously
that it has been called.
@end defmac
-@node Obsolete Macros, , Suggested Ordering, Dependencies Between Macros
+@node Obsolete Macros, , Suggested Ordering, Dependencies Between Macros
@subsection Obsolete Macros
Configuration and portability technology has evolved over the years.
* Using System Type:: What to do with the system type.
@end menu
-@node Specifying Names, Canonicalizing, , Manual Configuration
+@node Specifying Names, Canonicalizing, Manual Configuration, Manual Configuration
@section Specifying the System Type
Like other GNU @code{configure} scripts, Autoconf-generated
the individual parts of the canonical names (for convenience).
@end table
-@node Using System Type, , System Type Variables, Manual Configuration
+@node Using System Type, , System Type Variables, Manual Configuration
@section Using the System Type
How do you use a canonical system type? Usually, you use it in one or
* Site Defaults:: Giving @code{configure} local defaults.
@end menu
-@node External Software, Package Options, , Site Configuration
+@node External Software, Package Options, Site Configuration, Site Configuration
@section Working With External Software
Some packages require, or can optionally use, other software packages
* Transformation Rules:: @file{Makefile} uses of transforming names.
@end menu
-@node Transformation Options, Transformation Examples, , Transforming Names
+@node Transformation Options, Transformation Examples, Transforming Names, Transforming Names
@subsection Transformation Options
You can specify name transformations by giving @code{configure} these
programs as @file{/usr/local/bin/autoconf2},
@file{/usr/local/bin/autoheader2}, etc.
-@node Transformation Rules, , Transformation Examples, Transforming Names
+@node Transformation Rules, , Transformation Examples, Transforming Names
@subsection Transformation Rules
Here is how to use the variable @code{program_transform_name} in a
best to do name transformations on @code{man} pages but not on Texinfo
manuals.
-@node Site Defaults, , Transforming Names, Site Configuration
+@node Site Defaults, , Transforming Names, Site Configuration
@section Setting Site Defaults
Autoconf-generated @code{configure} scripts allow your site to provide
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@end menu
-@node Distributing, Why GNU m4, , Questions
+@node Distributing, Why GNU m4, Questions, Questions
@section Distributing @code{configure} Scripts
@display
required if you want to change the @code{m4} @code{configure} script,
which few people have to do (mainly its maintainer).
-@node Why Not Imake, , Bootstrapping, Questions
+@node Why Not Imake, , Bootstrapping, Questions
@section Why Not Imake?
@display
* Changed Macro Writing:: Better ways to write your own macros.
@end menu
-@node Changed File Names, Changed Makefiles, , Upgrading
+@node Changed File Names, Changed Makefiles, Upgrading, Upgrading
@section Changed File Names
If you have an @file{aclocal.m4} installed with Autoconf (as opposed to
you were relying on a shell variable being set to something like 1 or
@samp{t} for true, you need to change your tests.
-@node Changed Macro Writing, , Changed Results, Upgrading
+@node Changed Macro Writing, , Changed Results, Upgrading
@section Changed Macro Writing
When defining your own macros, you should now use @code{AC_DEFUN}
* Deuteronomy:: Approaching the promises of easy configuration.
@end menu
-@node Genesis, Exodus, , History
+@node Genesis, Exodus, History, History
@section Genesis
In June 1991 I was maintaining many of the GNU utilities for the Free
especially when I got sick of dealing with portability problems from
February through June, 1993.
-@node Deuteronomy, , Numbers, History
+@node Deuteronomy, , Numbers, History
@section Deuteronomy
A long wish list for major features had accumulated, and the effect of
@printindex cv
-@node Macro Index, , Preprocessor Symbol Index, Top
+@node Macro Index, , Preprocessor Symbol Index, Top
@unnumbered Macro Index
This is an alphabetical list of the Autoconf macros. To make the list
@c Define a macro index that @@defmac doesn't write to.
@defcodeindex ma
-@node Top, Introduction, , (dir)
+@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@ifinfo
* Preprocessor Symbol Index:: Index of C preprocessor symbols defined.
* Macro Index:: Index of Autoconf macros.
+@detailmenu
--- The Detailed Node Listing ---
Making @code{configure} Scripts
* Header Files:: Header files that might be missing.
* Structures:: Structures or members that might be missing.
* Typedefs:: @code{typedef}s that might be missing.
-* Compiler Characteristics:: C compiler or machine architecture features.
+* C Compiler Characteristics::
+* Fortran 77 Compiler Characteristics::
* System Services:: Operating system services.
* UNIX Variants:: Special kludges for specific UNIX variants.
* Macro Definitions:: Basic format of an Autoconf macro.
* Macro Names:: What to call your new macros.
* Quoting:: Protecting macros from unwanted expansion.
-* Dependencies Between Macros:: What to do when macros depend on other macros.
+* Dependencies Between Macros:: What to do when macros depend on other macros.
Dependencies Between Macros
* Leviticus:: The priestly code of portability arrives.
* Numbers:: Growth and contributors.
* Deuteronomy:: Approaching the promises of easy configuration.
+
+@end detailmenu
@end menu
@node Introduction, Making configure Scripts, Top, Top
* Invoking autoreconf:: Remaking multiple @code{configure} scripts.
@end menu
-@node Writing configure.in, Invoking autoscan, , Making configure Scripts
+@node Writing configure.in, Invoking autoscan, Making configure Scripts, Making configure Scripts
@section Writing @file{configure.in}
To produce a @code{configure} script for a software package, create a
Print the version number of Autoconf and exit.
@end table
-@node Invoking autoreconf, , Invoking autoconf, Making configure Scripts
+@node Invoking autoreconf, , Invoking autoconf, Making configure Scripts
@section Using @code{autoreconf} to Update @code{configure} Scripts
If you have a lot of Autoconf-generated @code{configure} scripts, the
* Versions:: Version numbers in @code{configure}.
@end menu
-@node Input, Output, , Setup
+@node Input, Output, Setup, Setup
@section Finding @code{configure} Input
Every @code{configure} script must call @code{AC_INIT} before doing
* Automatic Remaking:: Makefile rules for configuring.
@end menu
-@node Preset Output Variables, Build Directories, , Makefile Substitutions
+@node Preset Output Variables, Build Directories, Makefile Substitutions, Makefile Substitutions
@subsection Preset Output Variables
Some output variables are preset by the Autoconf macros. Some of the
$(MAKEINFO) $(srcdir)/time.texinfo
@end example
-@node Automatic Remaking, , Build Directories, Makefile Substitutions
+@node Automatic Remaking, , Build Directories, Makefile Substitutions
@subsection Automatic Remaking
You can put rules like the following in the top-level @file{Makefile.in}
* Invoking autoheader:: How to create configuration templates.
@end menu
-@node Header Templates, Invoking autoheader, , Configuration Headers
+@node Header Templates, Invoking autoheader, Configuration Headers, Configuration Headers
@subsection Configuration Header Templates
Your distribution should contain a template file that looks as you want
@end group
@end example
-@node Invoking autoheader, , Header Templates, Configuration Headers
+@node Invoking autoheader, , Header Templates, Configuration Headers
@subsection Using @code{autoheader} to Create @file{config.h.in}
The @code{autoheader} program can create a template file of C
set the prefix to @file{/usr/local/gnu}.
@end defmac
-@node Versions, , Default Prefix, Setup
+@node Versions, , Default Prefix, Setup
@section Version Numbers in @code{configure}
The following macros manage version numbers for @code{configure}
* Header Files:: Header files that might be missing.
* Structures:: Structures or members that might be missing.
* Typedefs:: @code{typedef}s that might be missing.
-* Compiler Characteristics:: C compiler or machine architecture features.
+* C Compiler Characteristics::
+* Fortran 77 Compiler Characteristics::
* System Services:: Operating system services.
* UNIX Variants:: Special kludges for specific UNIX variants.
@end menu
-@node Alternative Programs, Libraries, , Existing Tests
+@node Alternative Programs, Libraries, Existing Tests, Existing Tests
@section Alternative Programs
These macros check for the presence or behavior of particular programs.
* Generic Programs:: How to find other programs.
@end menu
-@node Particular Programs, Generic Programs, , Alternative Programs
+@node Particular Programs, Generic Programs, Alternative Programs, Alternative Programs
@subsection Particular Program Checks
These macros check for particular programs---whether they exist, and
to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}.
@end defmac
-@node Generic Programs, , Particular Programs, Alternative Programs
+@node Generic Programs, , Particular Programs, Alternative Programs
@subsection Generic Program Checks
These macros are used to find programs not covered by the particular
* Generic Functions:: How to find other functions.
@end menu
-@node Particular Functions, Generic Functions, , Library Functions
+@node Particular Functions, Generic Functions, Library Functions, Library Functions
@subsection Particular Function Checks
These macros check for particular C functions---whether they exist, and
@code{HAVE_WAIT3}.
@end defmac
-@node Generic Functions, , Particular Functions, Library Functions
+@node Generic Functions, , Particular Functions, Library Functions
@subsection Generic Function Checks
These macros are used to find functions not covered by the particular
* Generic Headers:: How to find other headers.
@end menu
-@node Particular Headers, Generic Headers, , Header Files
+@node Particular Headers, Generic Headers, Header Files, Header Files
@subsection Particular Header Checks
These macros check for particular system header files---whether they
example for @code{AC_HEADER_STDC}.
@end defmac
-@node Generic Headers, , Particular Headers, Header Files
+@node Generic Headers, , Particular Headers, Header Files
@subsection Generic Header Checks
These macros are used to find system header files not covered by the
external array @code{tzname} is found, define @code{HAVE_TZNAME}.
@end defmac
-@node Typedefs, Compiler Characteristics, Structures, Existing Tests
+@node Typedefs, C Compiler Characteristics, Structures, Existing Tests
@section Typedefs
The following macros check for C typedefs. If there is no macro
* Generic Typedefs:: How to find other types.
@end menu
-@node Particular Typedefs, Generic Typedefs, , Typedefs
+@node Particular Typedefs, Generic Typedefs, Typedefs, Typedefs
@subsection Particular Typedef Checks
These macros check for particular C typedefs in @file{sys/types.h} and
@code{gid_t} to be @code{int}.
@end defmac
-@node Generic Typedefs, , Particular Typedefs, Typedefs
+@node Generic Typedefs, , Particular Typedefs, Typedefs
@subsection Generic Typedef Checks
This macro is used to check for typedefs not covered by the particular
@samp{unsigned}.
@end defmac
-@node Compiler Characteristics, System Services, Typedefs, Existing Tests
-@section Compiler Characteristics
+@node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests
+@section C Compiler Characteristics
The following macros check for C compiler or machine architecture
features. To check for characteristics not listed here, use
@samp{AC_CHECK_SIZEOF(long)} instead.
@end defmac
-@node System Services, UNIX Variants, Compiler Characteristics, Existing Tests
+
+@node Fortran 77 Compiler Characteristics, System Services, C Compiler Characteristics, Existing Tests
+@section Fortran 77 Compiler Characteristics
+
+The following macros check for Fortran 77 compiler characteristics. To
+check for characteristics not listed here, use @code{AC_TRY_COMPILE}
+(@pxref{Examining Syntax}) or @code{AC_TRY_RUN} (@pxref{Run Time}),
+making sure to first set the current lanuage to Fortran 77
+@code{AC_LANG_FORTRAN77} (@pxref{Language Choice}).
+
+@defmac AC_F77_LIBRARY_LDFLAGS
+@maindex F77_LIBRARY_LDFLAGS
+@ovindex FLIBS
+Determine the linker flags (e.g. @samp{-L} and @samp{-l}) for the
+@dfn{Fortran 77 intrinsic and run-time libraries} that are required to
+successfully link a Fortran 77 program or shared library. The output
+variable @code{FLIBS} is set to these flags.
+
+This macro is intended to be used in those situations when it is
+necessary to mix, e.g. C++ and Fortran 77 source code into a single
+program or shared library (@pxref{Mixing Fortran 77 With C and C++, , ,
+automake, GNU Automake}).
+
+For example, if object files from a C++ and Fortran 77 compiler must be
+linked together, then the C++ compiler/linker must be used for linking
+(since special C++-ish things need to happen at link time like calling
+global constructors, instantiating templates, enabling exception
+support, etc.).
+
+However, the Fortran 77 intrinsic and run-time libraries must be linked
+in as well, but the C++ compiler/linker doesn't know by default how to
+add these Fortran 77 libraries. Hence, the macro
+@code{AC_F77_LIBRARY_LDFLAGS} was created to determine these Fortran 77
+libraries.
+@end defmac
+
+
+@node System Services, UNIX Variants, Fortran 77 Compiler Characteristics, Existing Tests
@section System Services
The following macros check for operating system services or capabilities.
by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}.
@end defmac
-@node UNIX Variants, , System Services, Existing Tests
+@node UNIX Variants, , System Services, Existing Tests
@section UNIX Variants
The following macros check for certain operating systems that need
* Language Choice:: Selecting which language to use for testing.
@end menu
-@node Examining Declarations, Examining Syntax, , Writing Tests
+@node Examining Declarations, Examining Syntax, Writing Tests, Writing Tests
@section Examining Declarations
The macro @code{AC_TRY_CPP} is used to check whether particular header
* Test Functions:: Avoiding pitfalls in test programs.
@end menu
-@node Test Programs, Guidelines, , Run Time
+@node Test Programs, Guidelines, Run Time, Run Time
@subsection Running Test Programs
Use the following macro if you need to test run-time behavior of the
@code{configure} script cleans up by running @samp{rm -rf conftest*}
after running test programs and if the script is interrupted.
-@node Test Functions, , Guidelines, Run Time
+@node Test Functions, , Guidelines, Run Time
@subsection Test Functions
Function declarations in test programs should have a prototype
@end group
@end example
-@node Language Choice, , Multiple Cases, Writing Tests
+@node Language Choice, , Multiple Cases, Writing Tests
@section Language Choice
Packages that use both C and C++ need to test features of both
* Printing Messages:: Notifying users of progress or problems.
@end menu
-@node Defining Symbols, Setting Output Variables, , Results
+@node Defining Symbols, Setting Output Variables, Results, Results
@section Defining C Preprocessor Symbols
A common action to take in response to a feature test is to define a C
* Cache Files:: Files @code{configure} uses for caching.
@end menu
-@node Cache Variable Names, Cache Files, , Caching Results
+@node Cache Variable Names, Cache Files, Caching Results, Caching Results
@subsection Cache Variable Names
The names of cache variables should have the following format:
Usually, their values will be boolean (@samp{yes} or @samp{no}) or the
names of files or functions; so this is not an important restriction.
-@node Cache Files, , Cache Variable Names, Caching Results
+@node Cache Files, , Cache Variable Names, Caching Results
@subsection Cache Files
A cache file is a shell script that caches the results of configure
transparently, as long as the same C compiler is used every time
(@pxref{Site Defaults}).
-@node Printing Messages, , Caching Results, Results
+@node Printing Messages, , Caching Results, Results
@section Printing Messages
@code{configure} scripts need to give users running them several kinds
* Macro Definitions:: Basic format of an Autoconf macro.
* Macro Names:: What to call your new macros.
* Quoting:: Protecting macros from unwanted expansion.
-* Dependencies Between Macros:: What to do when macros depend on other macros.
+* Dependencies Between Macros:: What to do when macros depend on other macros.
@end menu
-@node Macro Definitions, Macro Names, , Writing Macros
+@node Macro Definitions, Macro Names, Writing Macros, Writing Macros
@section Macro Definitions
@maindex DEFUN
unexpanded macros. The @code{autoconf} program checks for this problem
by doing @samp{grep AC_ configure}.
-@node Dependencies Between Macros, , Quoting, Writing Macros
+@node Dependencies Between Macros, , Quoting, Writing Macros
@section Dependencies Between Macros
Some Autoconf macros depend on other macros having been called first in
* Obsolete Macros:: Warning about old ways of doing things.
@end menu
-@node Prerequisite Macros, Suggested Ordering, , Dependencies Between Macros
+@node Prerequisite Macros, Suggested Ordering, Dependencies Between Macros, Dependencies Between Macros
@subsection Prerequisite Macros
A macro that you write might need to use values that have previously
that it has been called.
@end defmac
-@node Obsolete Macros, , Suggested Ordering, Dependencies Between Macros
+@node Obsolete Macros, , Suggested Ordering, Dependencies Between Macros
@subsection Obsolete Macros
Configuration and portability technology has evolved over the years.
* Using System Type:: What to do with the system type.
@end menu
-@node Specifying Names, Canonicalizing, , Manual Configuration
+@node Specifying Names, Canonicalizing, Manual Configuration, Manual Configuration
@section Specifying the System Type
Like other GNU @code{configure} scripts, Autoconf-generated
the individual parts of the canonical names (for convenience).
@end table
-@node Using System Type, , System Type Variables, Manual Configuration
+@node Using System Type, , System Type Variables, Manual Configuration
@section Using the System Type
How do you use a canonical system type? Usually, you use it in one or
* Site Defaults:: Giving @code{configure} local defaults.
@end menu
-@node External Software, Package Options, , Site Configuration
+@node External Software, Package Options, Site Configuration, Site Configuration
@section Working With External Software
Some packages require, or can optionally use, other software packages
* Transformation Rules:: @file{Makefile} uses of transforming names.
@end menu
-@node Transformation Options, Transformation Examples, , Transforming Names
+@node Transformation Options, Transformation Examples, Transforming Names, Transforming Names
@subsection Transformation Options
You can specify name transformations by giving @code{configure} these
programs as @file{/usr/local/bin/autoconf2},
@file{/usr/local/bin/autoheader2}, etc.
-@node Transformation Rules, , Transformation Examples, Transforming Names
+@node Transformation Rules, , Transformation Examples, Transforming Names
@subsection Transformation Rules
Here is how to use the variable @code{program_transform_name} in a
best to do name transformations on @code{man} pages but not on Texinfo
manuals.
-@node Site Defaults, , Transforming Names, Site Configuration
+@node Site Defaults, , Transforming Names, Site Configuration
@section Setting Site Defaults
Autoconf-generated @code{configure} scripts allow your site to provide
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@end menu
-@node Distributing, Why GNU m4, , Questions
+@node Distributing, Why GNU m4, Questions, Questions
@section Distributing @code{configure} Scripts
@display
required if you want to change the @code{m4} @code{configure} script,
which few people have to do (mainly its maintainer).
-@node Why Not Imake, , Bootstrapping, Questions
+@node Why Not Imake, , Bootstrapping, Questions
@section Why Not Imake?
@display
* Changed Macro Writing:: Better ways to write your own macros.
@end menu
-@node Changed File Names, Changed Makefiles, , Upgrading
+@node Changed File Names, Changed Makefiles, Upgrading, Upgrading
@section Changed File Names
If you have an @file{aclocal.m4} installed with Autoconf (as opposed to
you were relying on a shell variable being set to something like 1 or
@samp{t} for true, you need to change your tests.
-@node Changed Macro Writing, , Changed Results, Upgrading
+@node Changed Macro Writing, , Changed Results, Upgrading
@section Changed Macro Writing
When defining your own macros, you should now use @code{AC_DEFUN}
* Deuteronomy:: Approaching the promises of easy configuration.
@end menu
-@node Genesis, Exodus, , History
+@node Genesis, Exodus, History, History
@section Genesis
In June 1991 I was maintaining many of the GNU utilities for the Free
especially when I got sick of dealing with portability problems from
February through June, 1993.
-@node Deuteronomy, , Numbers, History
+@node Deuteronomy, , Numbers, History
@section Deuteronomy
A long wish list for major features had accumulated, and the effect of
@printindex cv
-@node Macro Index, , Preprocessor Symbol Index, Top
+@node Macro Index, , Preprocessor Symbol Index, Top
@unnumbered Macro Index
This is an alphabetical list of the Autoconf macros. To make the list
])
dnl AC_LANG_FORTRAN77()
-AC_DEFUN([AC_LANG_FORTRAN77],
+AC_DEFUN(AC_LANG_FORTRAN77,
[define([AC_LANG], [FORTRAN77])dnl
ac_ext=f
-ac_compile='$FC $FFLAGS -c conftest.$ac_ext 1>&AC_FD_CC'
-ac_link='$FC $FFLAGS $LDFLAGS -c conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC'
+ac_compile='${FC-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
+ac_link='${FC-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
cross_compiling=$ac_cv_prog_fc_cross
])
dnl Macros that test for specific features.
dnl This file is part of Autoconf.
-dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+dnl Copyright (C) 1992, 93, 94, 95, 96, 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
AC_LANG_SAVE
AC_LANG_FORTRAN77
AC_TRY_COMPILER(dnl
-[ program conftest
- end
+[ program conftest
+ end
], ac_cv_prog_fc_works, ac_cv_prog_fc_cross)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_fc_works)
ac_objext=$ac_cv_objext
AC_SUBST(OBJEXT)])
+dnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77
+dnl intrinsic and run-time libraries that are required to successfully
+dnl link a Fortran 77 program or shared library. The output variable
+dnl FLIBS is set to these flags.
+dnl
+dnl This macro is intended to be used in those situations when it is
+dnl necessary to mix, e.g. C++ and Fortran 77, source code into a single
+dnl program or shared library.
+dnl
+dnl For example, if object files from a C++ and Fortran 77 compiler must
+dnl be linked together, then the C++ compiler/linker must be used for
+dnl linking (since special C++-ish things need to happen at link time
+dnl like calling global constructors, instantiating templates, enabling
+dnl exception support, etc.).
+dnl
+dnl However, the Fortran 77 intrinsic and run-time libraries must be
+dnl linked in as well, but the C++ compiler/linker doesn't know how to
+dnl add these Fortran 77 libraries. Hence, the macro
+dnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77
+dnl libraries.
+dnl
+dnl This macro was packaged in its current form by Matthew D. Langston
+dnl <langston@SLAC.Stanford.EDU>. However, nearly all of this macro
+dnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4',
+dnl and full credit should go to John W. Eaton for writing this
+dnl extremely useful macro. Thank you John.
+dnl
+dnl AC_F77_LIBRARY_LDFLAGS()
+AC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
+[AC_MSG_CHECKING([for Fortran libraries])
+AC_REQUIRE([AC_PROG_FC])
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_CACHE_VAL(ac_cv_flibs,
+[changequote(, )dnl
+dnl Write a minimal program and compile it with -v. I don't know what
+dnl to do if your compiler doesn't have -v...
+echo " END" > conftest.f
+foutput=`${FC} -v -o conftest conftest.f 2>&1`
+dnl
+dnl The easiest thing to do for xlf output is to replace all the commas
+dnl with spaces. Try to only do that if the output is really from xlf,
+dnl since doing that causes problems on other systems.
+dnl
+xlf_p=`echo $foutput | grep xlfentry`
+if test -n "$xlf_p"; then
+ foutput=`echo $foutput | sed 's/,/ /g'`
+fi
+dnl
+ld_run_path=`echo $foutput | \
+ sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
+dnl
+dnl We are only supposed to find this on Solaris systems...
+dnl Uh, the run path should be absolute, shouldn't it?
+dnl
+case "$ld_run_path" in
+ /*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
+ else
+ ld_run_path="-R $ld_run_path"
+ fi
+ ;;
+ *)
+ ld_run_path=
+ ;;
+esac
+dnl
+flibs=
+lflags=
+dnl
+dnl If want_arg is set, we know we want the arg to be added to the list,
+dnl so we don't have to examine it.
+dnl
+want_arg=
+dnl
+for arg in $foutput; do
+ old_want_arg=$want_arg
+ want_arg=
+dnl
+dnl None of the options that take arguments expect the argument to
+dnl start with a -, so pretend we didn't see anything special.
+dnl
+ if test -n "$old_want_arg"; then
+ case "$arg" in
+ -*)
+ old_want_arg=
+ ;;
+ esac
+ fi
+ case "$old_want_arg" in
+ '')
+ case $arg in
+ /*.a)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ lflags="$lflags $arg"
+ fi
+ ;;
+ -bI:*)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ if test "$ac_cv_prog_gcc" = yes; then
+ lflags="$lflags -Xlinker $arg"
+ else
+ lflags="$lflags $arg"
+ fi
+ fi
+ ;;
+ -lang* | -lcrt0.o | -lc | -lgcc)
+ arg=
+ ;;
+ -[lLR])
+ want_arg=$arg
+ arg=
+ ;;
+ -[lLR]*)
+ exists=false
+ for f in $lflags; do
+ if test x$arg = x$f; then
+ exists=true
+ fi
+ done
+ if $exists; then
+ arg=
+ else
+ case "$arg" in
+ -lkernel32)
+ case "$canonical_host_type" in
+ *-*-cygwin32)
+ arg=
+ ;;
+ *)
+ lflags="$lflags $arg"
+ ;;
+ esac
+ ;;
+ -lm)
+ ;;
+ *)
+ lflags="$lflags $arg"
+ ;;
+ esac
+ fi
+ ;;
+ -u)
+ want_arg=$arg
+ arg=
+ ;;
+ -Y)
+ want_arg=$arg
+ arg=
+ ;;
+ *)
+ arg=
+ ;;
+ esac
+ ;;
+ -[lLR])
+ arg="$old_want_arg $arg"
+ ;;
+ -u)
+ arg="-u $arg"
+ ;;
+ -Y)
+dnl
+dnl Should probably try to ensure unique directory options here too.
+dnl This probably only applies to Solaris systems, and then will only
+dnl work with gcc...
+dnl
+ arg=`echo $arg | sed -e 's%^P,%%'`
+ SAVE_IFS=$IFS
+ IFS=:
+ list=
+ for elt in $arg; do
+ list="$list -L$elt"
+ done
+ IFS=$SAVE_IFS
+ arg="$list"
+ ;;
+ esac
+dnl
+ if test -n "$arg"; then
+ flibs="$flibs $arg"
+ fi
+done
+if test -n "$ld_run_path"; then
+ flibs_result="$ld_run_path $flibs"
+else
+ flibs_result="$flibs"
+fi
+changequote([, ])dnl
+ac_cv_flibs="$flibs_result"])
+FLIBS="$ac_cv_flibs"
+AC_SUBST(FLIBS)dnl
+AC_MSG_RESULT($FLIBS)
+])
+
dnl ### Checks for operating system services