Work with beta autoconf 2.50.

* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.

* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
This commit is contained in:
Raja R Harinath 2000-10-09 21:06:01 +00:00
parent 61f2f04c41
commit 306bd3a2bf
10 changed files with 170 additions and 60 deletions

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,5 +1,18 @@
2000-10-09 Raja R Harinath <harinath@cs.umn.edu>
Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.

View File

@ -1,3 +1,27 @@
## Portability defines that help interoperate with classic and modern autoconfs
ifdef([AC_TR_SH],[
define([GLIB_TR_SH],[AC_TR_SH([$1])])
define([GLIB_TR_CPP],[AC_TR_CPP([$1])])
], [
define([GLIB_TR_SH],
[patsubst(translit([[$1]], [*+], [pp]), [[^a-zA-Z0-9_]], [_])])
define([GLIB_TR_CPP],
[patsubst(translit([[$1]],
[*abcdefghijklmnopqrstuvwxyz],
[PABCDEFGHIJKLMNOPQRSTUVWXYZ]),
[[^A-Z0-9_]], [_])])
])
# GLIB_DIVERT_BEFORE_HELP(STUFF)
# Put STUFF early enough so that they are available for $ac_help expansion.
# Handle both classic (<= v2.13) and modern autoconf
ifdef([AC_DIVERT],
[AC_DEFUN([GLIB_DIVERT_BEFORE_HELP],[AC_DIVERT([NOTICE],[$1])])],
[AC_DEFUN([GLIB_DIVERT_BEFORE_HELP],[dnl
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
$1
AC_DIVERT_POP()])])
dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
AC_DEFUN(GLIB_IF_VAR_EQ,[
case "$[$1]" in
@ -27,14 +51,8 @@ AC_DEFUN(GLIB_ADD_TO_VAR,[
dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
AC_DEFUN(GLIB_SIZEOF,
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(glib_cv_sizeof_$3, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(size of $2)
AC_CACHE_VAL(AC_CV_NAME,
[pushdef([glib_Sizeof], GLIB_TR_SH([glib_cv_sizeof_$3]))dnl
AC_CACHE_CHECK([size of $2], glib_Sizeof,
[AC_TRY_RUN([#include <stdio.h>
#if STDC_HEADERS
#include <stdlib.h>
@ -47,23 +65,19 @@ main()
if (!f) exit(1);
fprintf(f, "%d\n", sizeof($2));
exit(0);
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$4], , , AC_CV_NAME=$4))])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
}],
[glib_Sizeof=`cat conftestval` dnl''
],
[glib_Sizeof=0],
ifelse([$4], [], [], [glib_Sizeof=$4]))])
AC_DEFINE_UNQUOTED(GLIB_TR_CPP(glib_sizeof_$3), [$[]glib_Sizeof])
popdef([glib_Sizeof])dnl
])
dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
AC_DEFUN(GLIB_BYTE_CONTENTS,
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(glib_cv_byte_contents_$3, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(byte contents of $5)
AC_CACHE_VAL(AC_CV_NAME,
[pushdef([glib_ByteContents], GLIB_TR_SH([glib_cv_byte_contents_$3]))dnl
AC_CACHE_CHECK([byte contents of $5], glib_ByteContents,
[AC_TRY_RUN([#include <stdio.h>
$1
main()
@ -77,11 +91,13 @@ main()
fprintf(f, "%s%d", i?",":"", *(p++));
fprintf(f, "\n");
exit(0);
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=no, AC_CV_NAME=no)])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
}],
[glib_ByteContents=`cat conftestval` dnl''
],
[glib_ByteContents=no],
[glib_ByteContents=no])])
AC_DEFINE_UNQUOTED(GLIB_TR_CPP(glib_byte_contents_$3), [$[]glib_ByteContents])
popdef([glib_ByteContents])dnl
])
dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
@ -100,6 +116,7 @@ $1
int main (int c, char **v) {
FILE *f = fopen ("$glib_sysdefso", "a");
if (!f) return 1;
}
_______EOF
for glib_sysdef_input in $2 ; do
glib_sysdef=`echo $glib_sysdef_input | sed 's/^\([[^:]]*\):.*$/\1/'`

View File

@ -15,9 +15,7 @@ cflags_set=${CFLAGS+set}
# we rewrite this file
rm -f glibconfig-sysdefs.h
dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
GLIB_DIVERT_BEFORE_HELP([
#
# The following version number definitions apply to GLib, GModule, GObject and GThread
# as a whole, so if changes occoured in any of them, they are all
@ -37,8 +35,7 @@ GLIB_MICRO_VERSION=1
GLIB_INTERFACE_AGE=0
GLIB_BINARY_AGE=0
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
dnl
AC_DIVERT_POP()dnl
])dnl
AC_SUBST(GLIB_MAJOR_VERSION)
AC_SUBST(GLIB_MINOR_VERSION)
@ -90,15 +87,16 @@ case $host in
esac
AC_MSG_RESULT([$glib_native_beos])
dnl figure debugging default, prior to $ac_help setup
dnl
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
GLIB_DIVERT_BEFORE_HELP([
# figure debugging default, prior to $ac_help setup
if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
debug_default=yes
debug_default=yes
else
debug_default=minimum
fi
AC_DIVERT_POP()dnl
debug_default=minimum
fi[]dnl
])
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
@ -314,17 +312,8 @@ esac
AC_C_BIGENDIAN
# check for header files
AC_CHECK_HEADERS(float.h, AC_DEFINE(HAVE_FLOAT_H))
AC_CHECK_HEADERS(limits.h, AC_DEFINE(HAVE_LIMITS_H))
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
AC_CHECK_HEADERS(sys/param.h, AC_DEFINE(HAVE_SYS_PARAM_H))
AC_CHECK_HEADERS(sys/poll.h, AC_DEFINE(HAVE_SYS_POLL_H))
AC_CHECK_HEADERS(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H))
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
AC_CHECK_HEADERS(sys/times.h, AC_DEFINE(HAVE_SYS_TIMES_H))
AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
AC_CHECK_HEADERS(values.h, AC_DEFINE(HAVE_VALUES_H))
AC_CHECK_HEADERS(stdint.h, AC_DEFINE(HAVE_VALUES_H))
AC_CHECK_HEADERS([float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h])
AC_CHECK_HEADERS([sys/time.h sys/times.h unistd.h values.h stdint.h])
AC_MSG_CHECKING(whether make is GNU Make)
STRIP_BEGIN=
@ -449,11 +438,13 @@ AC_CACHE_VAL(glib_cv_sane_realloc,[
return realloc (0, sizeof (int)) == 0;
}],
glib_cv_sane_realloc=yes
AC_DEFINE(REALLOC_0_WORKS)
,
glib_cv_sane_realloc=no
,)
])
if test x$glib_cv_sane_realloc = xyes; then
AC_DEFINE(REALLOC_0_WORKS)
fi
AC_MSG_RESULT($glib_cv_sane_realloc)
dnl Check for nl_langinfo and CODESET
@ -579,10 +570,9 @@ G_MODULE_HAVE_DLERROR=0
dnl *** dlopen() and dlsym() in system libraries
if test -z "$G_MODULE_IMPL"; then
AC_CHECK_FUNC(dlopen,
AC_CHECK_FUNC(dlsym,
G_MODULE_IMPL=G_MODULE_IMPL_DL
,)
,)
[AC_CHECK_FUNC(dlsym,
[G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
[])
fi
dnl *** load_image (BeOS)
if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
@ -593,14 +583,13 @@ if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
G_MODULE_IMPL=G_MODULE_IMPL_BEOS
,)
fi
dnl *** dlopen() and dlsym() in libdl
# *** dlopen() and dlsym() in libdl
if test -z "$G_MODULE_IMPL"; then
AC_CHECK_LIB(dl, dlopen,
AC_CHECK_LIB(dl, dlsym,
G_MODULE_LIBS=-ldl
G_MODULE_IMPL=G_MODULE_IMPL_DL
,)
,)
[AC_CHECK_LIB(dl, dlsym,
[G_MODULE_LIBS=-ldl
G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
[])
fi
dnl *** shl_load() in libdld (HP-UX)
if test -z "$G_MODULE_IMPL"; then
@ -1183,7 +1172,7 @@ case "$CONFIG_OTHER" in
cat > $outfile <<\_______EOF
/* glibconfig.h
*
* This is a generated file. Please modify `configure.in'
* This is a generated file. Please modify 'configure.in'
*/
#ifndef GLIBCONFIG_H