Deleted Added
full compact
2c2
< dnl
---
> dnl
4,5c4,5
< dnl
< dnl It has been AutoGen-ed
---
> dnl
> dnl It has been AutoGen-ed Saturday May 5, 2007 at 12:02:37 PM PDT
12c12,19
< AC_REQUIRE([AC_HEADER_STDC])
---
> [if test X${INVOKE_LIBOPTS_MACROS_FIRST_done} != Xyes ; then]
> # =================
> # AC_HEADER_STDC
> # =================
> AC_HEADER_STDC
> # =================
> # AC_HEADER_DIRENT
> # =================
14c21
<
---
>
18,59c25,29
< AC_CHECK_HEADERS([ \
< sys/mman.h sys/param.h sys/poll.h sys/procset.h \
< sys/select.h sys/socket.h sys/stropts.h sys/time.h \
< sys/un.h sys/wait.h dlfcn.h errno.h \
< fcntl.h libgen.h libintl.h memory.h \
< netinet/in.h setjmp.h stdbool.h sysexits.h \
< unistd.h utime.h])
<
< AC_CHECK_HEADERS([stdarg.h varargs.h],
< [lo_have_arg_hdr=true;break],
< [lo_have_arg_hdr=false])
<
< AC_CHECK_HEADERS([string.h strings.h],
< [lo_have_str_hdr=true;break],
< [lo_have_str_hdr=false])
<
< AC_CHECK_HEADERS([limits.h sys/limits.h values.h],
< [lo_have_lim_hdr=true;break],
< [lo_have_lim_hdr=false])
<
< AC_CHECK_HEADERS([inttypes.h stdint.h],
< [lo_have_typ_hdr=true;break],
< [lo_have_typ_hdr=false])
< gl_STDNORETURN_H
<
< # ----------------------------------------------------------------------
< # check for various programs used during the build.
< # On OS/X, "wchar.h" needs "runetype.h" to work properly.
< # ----------------------------------------------------------------------
< AC_CHECK_HEADERS([runetype.h wchar.h], [], [],[
< AC_INCLUDES_DEFAULT
< #if HAVE_RUNETYPE_H
< # include <runetype.h>
< #endif
< ])
<
< AC_ARG_ENABLE([nls],
< AS_HELP_STRING([--disable-nls],[disable nls support in libopts]))
< AS_IF([test "x$enable_nls" != "xno" && \
< test "X${ac_cv_header_libintl_h}" = Xyes], [
< AC_DEFINE([ENABLE_NLS],[1],[nls support in libopts])])
<
---
> AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \
> setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \
> sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \
> utime.h sysexits.h)
>
63,80c33,37
< [${lo_have_arg_hdr} || \
< ]AC_MSG_ERROR([you must have stdarg.h or varargs.h on your system])[
<
< ${lo_have_str_hdr} || \
< ]AC_MSG_ERROR([you must have string.h or strings.h on your system])[
<
< ${lo_have_lim_hdr} || \
< ]AC_MSG_ERROR(
< [you must have one of limits.h, sys/limits.h or values.h])[
<
< ${lo_have_typ_hdr} || \
< ]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
<
< for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
< do eval as_ac_var=\${ac_cv_header_${f}_h}
< test "X${as_ac_var}" = Xyes || {
< ]AC_MSG_ERROR([you must have ${f}.h on your system])[
< }
---
> [for f in sys_types sys_mman sys_param sys_stat sys_wait \
> string errno stdlib memory setjmp
> do eval as_ac_var=\${ac_cv_header_${f}_h+set}
> test "${as_ac_var}" = set] || \
> AC_MSG_ERROR([You must have ${f}.h on your system])
82,84c39,82
< test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
< echo '#include <stdint.h>' > inttypes.h]
<
---
>
> # ================================================
> # AC_CHECK_HEADERS: stdarg.h is present define HAVE_STDARG_H, otherwise
> # if varargs.h is present define HAVE_VARARGS_H.
> # ================================================
> AC_CHECK_HEADERS(stdarg.h varargs.h, break)
> [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
> AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system])
> fi
>
> # ================================================
> # Similarly for the string.h and strings.h headers
> # ================================================
> AC_CHECK_HEADERS(string.h strings.h, break)
> [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
> AC_MSG_ERROR([You must have string.h or strings.h on your system])
> fi
>
> # =====================
> # ...and limits headers
> # =====================
> AC_CHECK_HEADERS(limits.h sys/limits.h values.h, break)
> [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
> AC_MSG_ERROR([You must have one of limits.h, sys/limits.h or values.h])
> fi
>
> # ========================
> # ...and int types headers
> # ========================
> AC_CHECK_HEADERS(stdint.h inttypes.h, break)
> AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
> intptr_t, uint_t])
>
> # ====================
> # uintptr type & sizes
> # ====================
> AC_CHECK_TYPES([uintptr_t], ,
> [AC_DEFINE([uintptr_t], unsigned long,
> [Alternate uintptr_t for systems without it.])])
> AC_CHECK_SIZEOF(char*, 4)
> AC_CHECK_SIZEOF(int, 4)
> AC_CHECK_SIZEOF(long, 4)
> AC_CHECK_SIZEOF(short, 2)
>
86c84
< # Checks for typedefs
---
> # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
88,107d85
< AC_CHECK_TYPES(wchar_t)
< AC_CHECK_TYPES(wint_t, [], [], [
< AC_INCLUDES_DEFAULT
< #if HAVE_RUNETYPE_H
< # include <runetype.h>
< #endif
< #if HAVE_WCHAR_H
< # include <wchar.h>
< #endif
< ])
< AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
< intptr_t, uintptr_t, uint_t, pid_t, size_t, ptrdiff_t])
< AC_CHECK_SIZEOF(char *, 8)
< AC_CHECK_SIZEOF(int, 4)
< AC_CHECK_SIZEOF(long, 8)
< AC_CHECK_SIZEOF(short, 2)
<
< # ------------
< # AC_CHECK_LIB
< # ------------
109d86
< AC_CHECK_LIB(intl,gettext)
111,133c88,90
< AC_FUNC_FORK
< AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
< strrchr strsignal fchmod fstat chmod])
< AC_PROG_SED
< [while :
< do
< POSIX_SHELL=`which bash`
< test -x "$POSIX_SHELL" && break
< POSIX_SHELL=`which dash`
< test -x "$POSIX_SHELL" && break
< POSIX_SHELL=/usr/xpg4/bin/sh
< test -x "$POSIX_SHELL" && break
< POSIX_SHELL=`/bin/sh -c '
< exec 2>/dev/null
< if ! true ; then exit 1 ; fi
< echo /bin/sh'`
< test -x "$POSIX_SHELL" && break
< ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
< done]
< AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
< [define to a working POSIX compliant shell])
< AC_SUBST([POSIX_SHELL])
< ])
---
> AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr strrchr])
> [ INVOKE_LIBOPTS_MACROS_FIRST_done=yes
> fi]])
143c100
< AS_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
---
> AC_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
147a105
>
154c112
<
---
>
160c118
< AS_HELP_STRING([--with-libregex], [libregex installation prefix]),
---
> AC_HELP_STRING([--with-libregex], [libregex installation prefix]),
166,167c124,125
< if test "${with_libregex+set}" = set && \
< test "X${withval}" = Xno
---
> if test "${with_libguile+set}" = set && \
> test "${withval}" = no
175,176c133,134
< AS_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
< [libopts_cv_with_libregex_cflags=${with_libregex_cflags}],
---
> AC_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
> [libopts_cv_with_libregex_cflags=${with_regex_cflags}],
182,183c140,141
< AS_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
< [libopts_cv_with_libregex_libs=${with_libregex_libs}],
---
> AC_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
> [libopts_cv_with_libregex_libs=${with_regex_libs}],
192c150
< * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
---
> * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
199c157
< * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
---
> * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";;
203a162,163
> fi ## disabled by request
>
219c179
< AC_RUN_IFELSE([@%:@include <stdio.h>
---
> AC_TRY_RUN([@%:@include <stdio.h>
224c184
< void comp_re(char const * pzPat) {
---
> void comp_re( char const* pzPat ) {
240c200
< [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
---
> [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN
242d201
< fi ## disabled by request
243a203
>
251,254d210
< libopts_cv_with_libregex_root=no
< libopts_cv_with_libregex_cflags=no
< libopts_cv_with_libregex_libs=no
< libopts_cv_with_libregex=no
256c212
<
---
>
263c219
< AC_RUN_IFELSE([@%:@include <string.h>
---
> AC_TRY_RUN([@%:@include <string.h>
265,266c221,222
< int main (int argc, char ** argv) {
< char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
---
> int main (int argc, char** argv) {
> char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
270c226
< ) # end of RUN_IFELSE
---
> ) # end of TRY_RUN
272a229
>
278c235
<
---
>
289c246
< if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
---
> if test $? -ne 0
290a248,249
> elif test -z "$libopts_cv_test_dev_zero"
> then libopts_cv_test_dev_zero=no
293a253
>
299c259
<
---
>
306c266
< AC_RUN_IFELSE([@%:@include <limits.h>
---
> AC_TRY_RUN([@%:@include <limits.h>
308c268
< int main (int argc, char ** argv) {
---
> int main (int argc, char** argv) {
318c278
< ) # end of RUN_IFELSE
---
> ) # end of TRY_RUN
320a281
>
326c287
<
---
>
333c294
< AC_RUN_IFELSE([@%:@include <time.h>
---
> AC_TRY_RUN([@%:@include <time.h>
351c312
< ) # end of RUN_IFELSE
---
> ) # end of TRY_RUN
353a315
>
359c321
<
---
>
366,368c328,330
< AC_RUN_IFELSE([@%:@include <stdio.h>
< int main (int argc, char ** argv) {
< FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
---
> AC_TRY_RUN([@%:@include <stdio.h>
> int main (int argc, char** argv) {
> FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
371c333
< ) # end of RUN_IFELSE
---
> ) # end of TRY_RUN
373a336
>
382c345
<
---
>
389,391c352,354
< AC_RUN_IFELSE([@%:@include <stdio.h>
< int main (int argc, char ** argv) {
< FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
---
> AC_TRY_RUN([@%:@include <stdio.h>
> int main (int argc, char** argv) {
> FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
394c357
< ) # end of RUN_IFELSE
---
> ) # end of TRY_RUN
396a360
>
405c369
<
---
>
411c375
< AS_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
---
> AC_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
415a380
>
421c386
<
---
>
426c391
< AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
---
> INVOKE_LIBOPTS_MACROS_FIRST
457a423,425
> dnl Time-stamp: "2006-09-23 19:36:24 bkorb"
> dnl Last Committed: $Date: 2006/09/24 02:59:00 $
> dnl
463,478d430
< dnl This file is part of AutoGen.
< dnl AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
< dnl
< dnl AutoGen is free software: you can redistribute it and/or modify it
< dnl under the terms of the GNU General Public License as published by the
< dnl Free Software Foundation, either version 3 of the License, or
< dnl (at your option) any later version.
< dnl
< dnl AutoGen is distributed in the hope that it will be useful, but
< dnl WITHOUT ANY WARRANTY; without even the implied warranty of
< dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
< dnl See the GNU General Public License for more details.
< dnl
< dnl You should have received a copy of the GNU General Public License along
< dnl with this program. If not, see <http://www.gnu.org/licenses/>.
< dnl
481,482c433
< AC_DEFUN([LIBOPTS_CHECK_COMMON],[
< AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
---
> AC_DEFUN([LIBOPTS_CHECK],[
485a437
> AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)
488c440
< [Use the supplied libopts tearoff code]),[
---
> [Force using the supplied libopts tearoff code]),[
490a443
> LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
493d445
< LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
497,499c449,451
< AC_HELP_STRING([--enable-libopts-install],
< [Install libopts with client installation]))
< AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" = Xyes])
---
> AC_HELP_STRING([--disable-libopts-install],
> [Do not install libopts with client installation]))
> AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno])
542,545c494,495
< fi # end of if test -z "${NEED_LIBOPTS_DIR}"
< if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
< NEED_LIBOPTS_DIR=''
< fi]
---
> fi # end of if test -z "${NEED_LIBOPTS_DIR}"]
>
549a500
> AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
551,586c502,503
< [# end of AC_DEFUN of LIBOPTS_CHECK_COMMON]
< ])
< dnl
< dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
< dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without
< dnl requiring same, a fallback implementation for older Automake is provided.
< dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
< dnl is correct only in terms of m4sh generated script.
< dnl
< m4_ifndef([AM_COND_IF],
< [AC_DEFUN([AM_COND_IF], [
< if test -z "$$1_TRUE"; then :
< m4_n([$2])[]dnl
< m4_ifval([$3],[
< else
< $3
< ])dnl
< fi[]dnl
< ])dnl
< ])
< dnl
< AC_DEFUN([LIBOPTS_CHECK_NOBUILD], [
< m4_pushdef([AO_Libopts_Dir],
< [ifelse($1, , [libopts], [$1])])
< LIBOPTS_BUILD_BLOCKED=true
< LIBOPTS_CHECK_COMMON(AO_Libopts_Dir)
< m4_popdef([AO_Libopts_Dir])dnl
< # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
< ])
< dnl
< AC_DEFUN([LIBOPTS_CHECK], [
< m4_pushdef([AO_Libopts_Dir],
< [ifelse($1, , [libopts], [$1])])
< LIBOPTS_BUILD_BLOCKED=''
< LIBOPTS_CHECK_COMMON(AO_Libopts_Dir)
< AM_COND_IF([NEED_LIBOPTS], [
---
>
> [if test -n "${NEED_LIBOPTS_DIR}" ; then]
588,591c505,508
< ])
< AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
< m4_popdef([AO_Libopts_Dir])dnl
< # end of AC_DEFUN of LIBOPTS_CHECK
---
> else
> INVOKE_LIBOPTS_MACROS_FIRST
> [fi
> # end of AC_DEFUN of LIBOPTS_CHECK]