home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 February / PCO_0299.ISO / filesbbs / linux / mikmod-3.000 / mikmod-3 / mikmod-3.1.2 / aclocal.m4 < prev    next >
Encoding:
M4 Source File  |  1998-12-07  |  10.4 KB  |  354 lines

  1. dnl aclocal.m4 generated automatically by aclocal 1.2
  2.  
  3. # Do all the work for Automake.  This macro actually does too much --
  4. # some checks are only needed if your package does certain things.
  5. # But this isn't really a big deal.
  6.  
  7. # serial 1
  8.  
  9. dnl Usage:
  10. dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  11.  
  12. AC_DEFUN(AM_INIT_AUTOMAKE,
  13. [AC_REQUIRE([AM_PROG_INSTALL])
  14. PACKAGE=[$1]
  15. AC_SUBST(PACKAGE)
  16. VERSION=[$2]
  17. AC_SUBST(VERSION)
  18. dnl test to see if srcdir already configured
  19. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  20.   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  21. fi
  22. ifelse([$3],,
  23. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  24. AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
  25. AM_SANITY_CHECK
  26. AC_ARG_PROGRAM
  27. dnl FIXME This is truly gross.
  28. missing_dir=`cd $ac_aux_dir && pwd`
  29. AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  30. AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  31. AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  32. AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  33. AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  34. AC_PROG_MAKE_SET])
  35.  
  36.  
  37. # serial 1
  38.  
  39. AC_DEFUN(AM_PROG_INSTALL,
  40. [AC_REQUIRE([AC_PROG_INSTALL])
  41. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  42. AC_SUBST(INSTALL_SCRIPT)dnl
  43. ])
  44.  
  45. #
  46. # Check to make sure that the build environment is sane.
  47. #
  48.  
  49. AC_DEFUN(AM_SANITY_CHECK,
  50. [AC_MSG_CHECKING([whether build environment is sane])
  51. # Just in case
  52. sleep 1
  53. echo timestamp > conftestfile
  54. # Do `set' in a subshell so we don't clobber the current shell's
  55. # arguments.  Must try -L first in case configure is actually a
  56. # symlink; some systems play weird games with the mod time of symlinks
  57. # (eg FreeBSD returns the mod time of the symlink's containing
  58. # directory).
  59. if (
  60.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  61.    if test "$@" = "X"; then
  62.       # -L didn't work.
  63.       set X `ls -t $srcdir/configure conftestfile`
  64.    fi
  65.    test "[$]2" = conftestfile
  66.    )
  67. then
  68.    # Ok.
  69.    :
  70. else
  71.    AC_MSG_ERROR([newly created file is older than distributed files!
  72. Check your system clock])
  73. fi
  74. rm -f conftest*
  75. AC_MSG_RESULT(yes)])
  76.  
  77. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  78. dnl The program must properly implement --version.
  79. AC_DEFUN(AM_MISSING_PROG,
  80. [AC_MSG_CHECKING(for working $2)
  81. # Run test in a subshell; some versions of sh will print an error if
  82. # an executable is not found, even if stderr is redirected.
  83. # Redirect stdin to placate older versions of autoconf.  Sigh.
  84. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  85.    $1=$2
  86.    AC_MSG_RESULT(found)
  87. else
  88.    $1="$3/missing $2"
  89.    AC_MSG_RESULT(missing)
  90. fi
  91. AC_SUBST($1)])
  92.  
  93. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  94.  
  95. AC_DEFUN(AM_CONFIG_HEADER,
  96. [AC_PREREQ([2.12])
  97. AC_CONFIG_HEADER([$1])
  98. dnl When config.status generates a header, we must update the stamp-h file.
  99. dnl This file resides in the same directory as the config header
  100. dnl that is generated.  We must strip everything past the first ":",
  101. dnl and everything past the last "/".
  102. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  103. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  104. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  105. <<am_indx=1
  106. for am_file in <<$1>>; do
  107.   case " <<$>>CONFIG_HEADERS " in
  108.   *" <<$>>am_file "*<<)>>
  109.     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  110.     ;;
  111.   esac
  112.   am_indx=`expr "<<$>>am_indx" + 1`
  113. done<<>>dnl>>)
  114. changequote([,]))])
  115.  
  116.  
  117. # serial 24 AM_PROG_LIBTOOL
  118. AC_DEFUN(AM_PROG_LIBTOOL,
  119. [AC_REQUIRE([AM_ENABLE_SHARED])dnl
  120. AC_REQUIRE([AM_ENABLE_STATIC])dnl
  121. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  122. AC_REQUIRE([AC_PROG_RANLIB])dnl
  123. AC_REQUIRE([AC_PROG_CC])dnl
  124. AC_REQUIRE([AM_PROG_LD])dnl
  125. AC_REQUIRE([AM_PROG_NM])dnl
  126. AC_REQUIRE([AC_PROG_LN_S])dnl
  127. dnl
  128. # Always use our own libtool.
  129. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  130. AC_SUBST(LIBTOOL)dnl
  131.  
  132. # Check for any special flags to pass to ltconfig.
  133. libtool_flags=
  134. test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
  135. test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
  136. test "$silent" = yes && libtool_flags="$libtool_flags --silent"
  137. test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
  138. test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
  139.  
  140. # Some flags need to be propagated to the compiler or linker for good
  141. # libtool support.
  142. case "$host" in
  143. *-*-irix6*)
  144.   # Find out which ABI we are using.
  145.   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  146.   if AC_TRY_EVAL(ac_compile); then
  147.     case "`/usr/bin/file conftest.o`" in
  148.     *32-bit*)
  149.       LD="${LD-ld} -32"
  150.       ;;
  151.     *N32*)
  152.       LD="${LD-ld} -n32"
  153.       ;;
  154.     *64-bit*)
  155.       LD="${LD-ld} -64"
  156.       ;;
  157.     esac
  158.   fi
  159.   rm -rf conftest*
  160.   ;;
  161.  
  162. *-*-sco3.2v5*)
  163.   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  164.   CFLAGS="$CFLAGS -belf"
  165.   ;;
  166. esac
  167.  
  168. # Actually configure libtool.  ac_aux_dir is where install-sh is found.
  169. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
  170. LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
  171. ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
  172. $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
  173. || AC_MSG_ERROR([libtool configure failed])
  174. ])
  175.  
  176. # AM_ENABLE_SHARED - implement the --enable-shared flag
  177. # Usage: AM_ENABLE_SHARED[(DEFAULT)]
  178. #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  179. #   `yes'.
  180. AC_DEFUN(AM_ENABLE_SHARED,
  181. [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  182. AC_ARG_ENABLE(shared,
  183. changequote(<<, >>)dnl
  184. <<  --enable-shared         build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
  185. changequote([, ])dnl
  186. [  --enable-shared=PKGS    only build shared libraries if the current package
  187.                           appears as an element in the PKGS list],
  188. [p=${PACKAGE-default}
  189. case "$enableval" in
  190. yes) enable_shared=yes ;;
  191. no) enable_shared=no ;;
  192. *)
  193.   enable_shared=no
  194.   # Look at the argument we got.  We use all the common list separators.
  195.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  196.   for pkg in $enableval; do
  197.     if test "X$pkg" = "X$p"; then
  198.       enable_shared=yes
  199.     fi
  200.   done
  201.   IFS="$ac_save_ifs"
  202.   ;;
  203. esac],
  204. enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
  205. ])
  206.  
  207. # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
  208. AC_DEFUN(AM_DISABLE_SHARED,
  209. [AM_ENABLE_SHARED(no)])
  210.  
  211. # AM_DISABLE_STATIC - set the default static flag to --disable-static
  212. AC_DEFUN(AM_DISABLE_STATIC,
  213. [AM_ENABLE_STATIC(no)])
  214.  
  215. # AM_ENABLE_STATIC - implement the --enable-static flag
  216. # Usage: AM_ENABLE_STATIC[(DEFAULT)]
  217. #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  218. #   `yes'.
  219. AC_DEFUN(AM_ENABLE_STATIC,
  220. [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  221. AC_ARG_ENABLE(static,
  222. changequote(<<, >>)dnl
  223. <<  --enable-static         build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
  224. changequote([, ])dnl
  225. [  --enable-static=PKGS    only build shared libraries if the current package
  226.                           appears as an element in the PKGS list],
  227. [p=${PACKAGE-default}
  228. case "$enableval" in
  229. yes) enable_static=yes ;;
  230. no) enable_static=no ;;
  231. *)
  232.   enable_static=no
  233.   # Look at the argument we got.  We use all the common list separators.
  234.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  235.   for pkg in $enableval; do
  236.     if test "X$pkg" = "X$p"; then
  237.       enable_static=yes
  238.     fi
  239.   done
  240.   IFS="$ac_save_ifs"
  241.   ;;
  242. esac],
  243. enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
  244. ])
  245.  
  246.  
  247. # AM_PROG_LD - find the path to the GNU or non-GNU linker
  248. AC_DEFUN(AM_PROG_LD,
  249. [AC_ARG_WITH(gnu-ld,
  250. [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  251. test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  252. AC_REQUIRE([AC_PROG_CC])
  253. ac_prog=ld
  254. if test "$ac_cv_prog_gcc" = yes; then
  255.   # Check if gcc -print-prog-name=ld gives a path.
  256.   AC_MSG_CHECKING([for ld used by GCC])
  257.   ac_prog=`($CC -print-prog-name=ld) 2>&5`
  258.   case "$ac_prog" in
  259.   # Accept absolute paths.
  260.   /* | [A-Za-z]:\\*)
  261.     test -z "$LD" && LD="$ac_prog"
  262.     ;;
  263.   "")
  264.     # If it fails, then pretend we aren't using GCC.
  265.     ac_prog=ld
  266.     ;;
  267.   *)
  268.     # If it is relative, then search for the first ld in PATH.
  269.     with_gnu_ld=unknown
  270.     ;;
  271.   esac
  272. elif test "$with_gnu_ld" = yes; then
  273.   AC_MSG_CHECKING([for GNU ld])
  274. else
  275.   AC_MSG_CHECKING([for non-GNU ld])
  276. fi
  277. AC_CACHE_VAL(ac_cv_path_LD,
  278. [if test -z "$LD"; then
  279.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  280.   for ac_dir in $PATH; do
  281.     test -z "$ac_dir" && ac_dir=.
  282.     if test -f "$ac_dir/$ac_prog"; then
  283.       ac_cv_path_LD="$ac_dir/$ac_prog"
  284.       # Check to see if the program is GNU ld.  I'd rather use --version,
  285.       # but apparently some GNU ld's only accept -v.
  286.       # Break only if it was the GNU/non-GNU ld that we prefer.
  287.       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  288.     test "$with_gnu_ld" != no && break
  289.       else
  290.         test "$with_gnu_ld" != yes && break
  291.       fi
  292.     fi
  293.   done
  294.   IFS="$ac_save_ifs"
  295. else
  296.   ac_cv_path_LD="$LD" # Let the user override the test with a path.
  297. fi])
  298. LD="$ac_cv_path_LD"
  299. if test -n "$LD"; then
  300.   AC_MSG_RESULT($LD)
  301. else
  302.   AC_MSG_RESULT(no)
  303. fi
  304. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  305. AC_SUBST(LD)
  306. AM_PROG_LD_GNU
  307. ])
  308.  
  309. AC_DEFUN(AM_PROG_LD_GNU,
  310. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
  311. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  312. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  313.   ac_cv_prog_gnu_ld=yes
  314. else
  315.   ac_cv_prog_gnu_ld=no
  316. fi])
  317. ])
  318.  
  319. # AM_PROG_NM - find the path to a BSD-compatible name lister
  320. AC_DEFUN(AM_PROG_NM,
  321. [AC_MSG_CHECKING([for BSD-compatible nm])
  322. AC_CACHE_VAL(ac_cv_path_NM,
  323. [case "$NM" in
  324. /* | [A-Za-z]:\\*)
  325.   ac_cv_path_NM="$NM" # Let the user override the test with a path.
  326.   ;;
  327. *)
  328.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  329.   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
  330.     test -z "$ac_dir" && ac_dir=.
  331.     if test -f $ac_dir/nm; then
  332.       # Check to see if the nm accepts a BSD-compat flag.
  333.       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  334.       #   nm: unknown option "B" ignored
  335.       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  336.         ac_cv_path_NM="$ac_dir/nm -B"
  337.       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  338.         ac_cv_path_NM="$ac_dir/nm -p"
  339.       else
  340.         ac_cv_path_NM="$ac_dir/nm"
  341.       fi
  342.       break
  343.     fi
  344.   done
  345.   IFS="$ac_save_ifs"
  346.   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
  347.   ;;
  348. esac])
  349. NM="$ac_cv_path_NM"
  350. AC_MSG_RESULT([$NM])
  351. AC_SUBST(NM)
  352. ])
  353.  
  354.