dnl ## dnl ## NGPT - Next Generation POSIX Threading dnl ## Copyright (c) 2001 IBM Corporation dnl ## Copyright (c) 1999-2000 Ralf S. Engelschall dnl ## dnl ## This file is part of NGPT, a non-preemptive thread scheduling dnl ## library which can be found at http://www.ibm.com/developer dnl ## dnl ## This library is free software; you can redistribute it and/or dnl ## modify it under the terms of the GNU Lesser General Public dnl ## License as published by the Free Software Foundation; either dnl ## version 2.1 of the License, or (at your option) any later version. dnl ## dnl ## This library 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 GNU dnl ## Lesser General Public License for more details. dnl ## dnl ## You should have received a copy of the GNU Lesser General Public dnl ## License along with this library; if not, write to the Free Software dnl ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 dnl ## USA, or contact Bill Abt dnl ## dnl ## aclocal.m4: Pth Autoconf macros dnl ## dnl # ``"Reuse an expert's code" is the right dnl # advice for most people. But it's a useless dnl # advice for the experts writing the code dnl # in the first place.' dnl # -- Dan J. Bernstein dnl ## dnl ## Display Configuration Headers dnl ## dnl ## configure.in: dnl ## AC_MSG_PART() dnl ## define(AC_MSG_PART,[dnl if test ".$enable_subdir" != .yes; then AC_MSG_RESULT() AC_MSG_RESULT(${TB}$1:${TN}) fi ])dnl dnl ## dnl ## Display a message under --verbose dnl ## dnl ## configure.in: dnl ## AC_MSG_VERBOSE() dnl ## define(AC_MSG_VERBOSE,[dnl if test ".$verbose" = .yes; then AC_MSG_RESULT([ $1]) fi ]) dnl ## dnl ## Do not display message for a command dnl ## dnl ## configure.in: dnl ## AC_MSG_SILENT(...) dnl ## define(AC_FD_TMP, 9) define(AC_MSG_SILENT,[dnl exec AC_FD_TMP>&AC_FD_MSG AC_FD_MSG>/dev/null $1 exec AC_FD_MSG>&AC_FD_TMP AC_FD_TMP>&- ]) dnl ## dnl ## Perform something only once dnl ## dnl ## configure.in: dnl ## AC_ONCE() dnl ## define(AC_ONCE,[ ifelse(ac_once_$1, already_done, ,[ define(ac_once_$1, already_done) $2 ])dnl ]) dnl ## dnl ## Support for $(S) dnl ## dnl ## configure.in: dnl ## AC_SRCDIR_PREFIX() dnl ## AC_DEFUN(AC_SRCDIR_PREFIX,[ ac_prog=[$]0 changequote(, )dnl ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` changequote([, ])dnl if test ".$ac_srcdir" = ".$ac_prog"; then ac_srcdir="" elif test "x$ac_srcdir" = "x."; then ac_srcdir="" else if test ".$CFLAGS" = .; then CFLAGS="-I$ac_srcdir" else CFLAGS="$CFLAGS -I$ac_srcdir" fi ac_srcdir="$ac_srcdir/" fi $1="$ac_srcdir" AC_SUBST($1) ])dnl dnl ## dnl ## Support for --enable-subdir (for use with pth.m4) dnl ## dnl ## configure.in: dnl ## AC_ENABLESUBDIR dnl ## AC_DEFUN(AC_ENABLESUBDIR,[ AC_ARG_ENABLE(subdir,dnl [ --enable-subdir enable local building as subdirectory (default=no)],[dnl ],[dnl enable_subdir=no ])dnl if test ".$enable_subdir" = .yes; then enable_batch=yes enable_shared=no fi ])dnl dnl ## dnl ## Support for Configuration Headers dnl ## dnl ## configure.in: dnl ## AC_HEADLINE(, , dnl ## , , dnl ## ) dnl ## AC_DEFUN(AC_HEADLINE,[dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl # configuration header if test ".`echo dummy [$]@ | grep enable-subdir`" != .; then enable_subdir=yes fi if test ".`echo dummy [$]@ | grep help`" = .; then # bootstrapping shtool ac_prog=[$]0 changequote(, )dnl ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` changequote([, ])dnl test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=. ac_shtool="${CONFIG_SHELL-/bin/sh} $ac_srcdir/shtool" # find out terminal sequences if test ".$enable_subdir" != .yes; then TB=`$ac_shtool echo -n -e %B 2>/dev/null` TN=`$ac_shtool echo -n -e %b 2>/dev/null` else TB='' TN='' fi # find out package version $3_STR="`$ac_shtool version -lc -dlong $ac_srcdir/$4`" AC_SUBST($3_STR) # friendly header ;) if test ".$enable_subdir" != .yes; then echo "Configuring ${TB}$1${TN} ($2), Version ${TB}${$3_STR}${TN}" echo "$5" fi # additionally find out hex version $3_HEX="`$ac_shtool version -lc -dhex $ac_srcdir/$4`" AC_SUBST($3_HEX) fi AC_DIVERT_POP() ])dnl dnl ## dnl ## Support for Platform IDs dnl ## dnl ## configure.in: dnl ## AC_PLATFORM() dnl ## AC_DEFUN(AC_PLATFORM,[ if test ".$host" != .NONE; then $1="$host" elif test ".$nonopt" != .NONE; then $1="$nonopt" else $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` fi $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $$1` || exit 1 AC_SUBST($1) if test ".$enable_subdir" != .yes; then echo "Platform: ${TB}${$1}${TN}" fi ])dnl dnl ## dnl ## Support for config.param files dnl ## dnl ## configure.in: dnl ## AC_CONFIG_PARAM() dnl ## AC_DEFUN(AC_CONFIG_PARAM,[ AC_DIVERT_PUSH(-1) AC_ARG_WITH(param,[ --with-param=ID[,ID,..] load parameters from $1]) AC_DIVERT_POP() AC_DIVERT_PUSH(AC_DIVERSION_NOTICE) ac_prev="" ac_param="" if test -f $1; then ac_param="$1:common" fi for ac_option do if test ".$ac_prev" != .; then eval "$ac_prev=\$ac_option" ac_prev="" continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[[-_a-zA-Z0-9]]*=//'` ;; *) ac_optarg="" ;; esac case "$ac_option" in --with-param=* ) case $ac_optarg in *:* ) ac_from=`echo $ac_optarg | sed -e 's/:.*//'` ac_what=`echo $ac_optarg | sed -e 's/.*://'` ;; * ) ac_from="$1" ac_what="$ac_optarg" ;; esac if test ".$ac_param" = .; then ac_param="$ac_from:$ac_what" else ac_param="$ac_param,$ac_from:$ac_what" fi ;; esac done if test ".$ac_param" != .; then # echo "loading parameters" OIFS="$IFS" IFS="," pconf="/tmp/autoconf.$$" echo "ac_options=''" >$pconf ac_from="$1" for ac_section in $ac_param; do changequote(, ) case $ac_section in *:* ) ac_from=`echo "$ac_section" | sed -e 's/:.*//'` ac_section=`echo "$ac_section" | sed -e 's/.*://'` ;; esac (echo ''; cat $ac_from; echo '') |\ sed -e "1,/[ ]*[ ]*${ac_section}[ ]*{[ ]*/d" \ -e '/[ ]*}[ ]*/,$d' \ -e ':join' -e '/\\[ ]*$/N' -e 's/\\[ ]*\n[ ]*//' -e 'tjoin' \ -e 's/^[ ]*//g' \ -e 's/^\([^-].*=.*\) IF \(.*\)$/if \2; then \1; fi/' \ -e 's/^\(--.*=.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \ -e 's/^\(--.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \ -e 's/^\(--.*=.*\)$/ac_options="$ac_options \1"/' \ -e 's/^\(--.*\)$/ac_options="$ac_options \1"/' \ >>$pconf changequote([, ]) done IFS="$OIFS" . $pconf rm -f $pconf >/dev/null 2>&1 if test ".[$]*" = .; then set -- $ac_options else set -- "[$]@" $ac_options fi fi AC_DIVERT_POP() ])dnl dnl ## dnl ## Check whether compiler option works dnl ## dnl ## configure.in: dnl ## AC_COMPILER_OPTION(, ,