Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:44:45 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
ec6cf3b09d Ed H*0001 dnl aclocal.m4 generated automatically by aclocal 1.4
                0002 
                0003 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
                0004 dnl This file is free software; the Free Software Foundation
                0005 dnl gives unlimited permission to copy and/or distribute it,
                0006 dnl with or without modifications, as long as this notice is preserved.
                0007 
                0008 dnl This program is distributed in the hope that it will be useful,
                0009 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
                0010 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
                0011 dnl PARTICULAR PURPOSE.
                0012 
                0013 # Do all the work for Automake.  This macro actually does too much --
                0014 # some checks are only needed if your package does certain things.
                0015 # But this isn't really a big deal.
                0016 
                0017 # serial 1
                0018 
                0019 dnl Usage:
                0020 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
                0021 
                0022 AC_DEFUN(AM_INIT_AUTOMAKE,
                0023 [AC_REQUIRE([AC_PROG_INSTALL])
                0024 PACKAGE=[$1]
                0025 AC_SUBST(PACKAGE)
                0026 VERSION=[$2]
                0027 AC_SUBST(VERSION)
                0028 dnl test to see if srcdir already configured
                0029 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
                0030   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
                0031 fi
                0032 ifelse([$3],,
                0033 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
                0034 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
                0035 AC_REQUIRE([AM_SANITY_CHECK])
                0036 AC_REQUIRE([AC_ARG_PROGRAM])
                0037 dnl FIXME This is truly gross.
                0038 missing_dir=`cd $ac_aux_dir && pwd`
                0039 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
                0040 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
                0041 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
                0042 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
                0043 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
                0044 AC_REQUIRE([AC_PROG_MAKE_SET])])
                0045 
                0046 #
                0047 # Check to make sure that the build environment is sane.
                0048 #
                0049 
                0050 AC_DEFUN(AM_SANITY_CHECK,
                0051 [AC_MSG_CHECKING([whether build environment is sane])
                0052 # Just in case
                0053 sleep 1
                0054 echo timestamp > conftestfile
                0055 # Do `set' in a subshell so we don't clobber the current shell's
                0056 # arguments.  Must try -L first in case configure is actually a
                0057 # symlink; some systems play weird games with the mod time of symlinks
                0058 # (eg FreeBSD returns the mod time of the symlink's containing
                0059 # directory).
                0060 if (
                0061    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
                0062    if test "[$]*" = "X"; then
                0063       # -L didn't work.
                0064       set X `ls -t $srcdir/configure conftestfile`
                0065    fi
                0066    if test "[$]*" != "X $srcdir/configure conftestfile" \
                0067       && test "[$]*" != "X conftestfile $srcdir/configure"; then
                0068 
                0069       # If neither matched, then we have a broken ls.  This can happen
                0070       # if, for instance, CONFIG_SHELL is bash and it inherits a
                0071       # broken ls alias from the environment.  This has actually
                0072       # happened.  Such a system could not be considered "sane".
                0073       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
                0074 alias in your environment])
                0075    fi
                0076 
                0077    test "[$]2" = conftestfile
                0078    )
                0079 then
                0080    # Ok.
                0081    :
                0082 else
                0083    AC_MSG_ERROR([newly created file is older than distributed files!
                0084 Check your system clock])
                0085 fi
                0086 rm -f conftest*
                0087 AC_MSG_RESULT(yes)])
                0088 
                0089 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
                0090 dnl The program must properly implement --version.
                0091 AC_DEFUN(AM_MISSING_PROG,
                0092 [AC_MSG_CHECKING(for working $2)
                0093 # Run test in a subshell; some versions of sh will print an error if
                0094 # an executable is not found, even if stderr is redirected.
                0095 # Redirect stdin to placate older versions of autoconf.  Sigh.
                0096 if ($2 --version) < /dev/null > /dev/null 2>&1; then
                0097    $1=$2
                0098    AC_MSG_RESULT(found)
                0099 else
                0100    $1="$3/missing $2"
                0101    AC_MSG_RESULT(missing)
                0102 fi
                0103 AC_SUBST($1)])
                0104 
                0105 dnl bsd_sockets.m4--which socket libraries do we need? 
                0106 dnl Derrick Brashear
                0107 dnl from Zephyr
                0108 
                0109 dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
                0110 dnl It now puts everything required for sockets into LIB_SOCKET
                0111 
                0112 AC_DEFUN(CMU_SOCKETS, [
                0113         save_LIBS="$LIBS"
                0114         LIB_SOCKET=""
                0115         AC_CHECK_FUNC(connect, :,
                0116                 AC_CHECK_LIB(nsl, gethostbyname,
                0117                              LIB_SOCKET="-lnsl $LIB_SOCKET")
                0118                 AC_CHECK_LIB(socket, connect,
                0119                              LIB_SOCKET="-lsocket $LIB_SOCKET")
                0120         )
                0121         LIBS="$LIB_SOCKET $save_LIBS"
                0122         AC_CHECK_FUNC(res_search, :,
                0123                 AC_CHECK_LIB(resolv, res_search,
                0124                               LIB_SOCKET="-lresolv $LIB_SOCKET") 
                0125         )
                0126         LIBS="$LIB_SOCKET $save_LIBS"
                0127         AC_CHECK_FUNCS(dn_expand dns_lookup)
                0128         LIBS="$save_LIBS"
                0129         AC_SUBST(LIB_SOCKET)
                0130         ])
                0131