1
dnl Modifications for the latest version of Autoconf for kpathsea.
2
dnl These changes have all been sent back to the Autoconf maintainer via
3
dnl bug-gnu-utils@prep.ai.mit.edu.
6
dnl kb_AC_LIBTOOL_REPLACE_FUNCS(FUNCTION-NAME...)
7
AC_DEFUN(kb_AC_LIBTOOL_REPLACE_FUNCS,
10
AC_CHECK_FUNC($ac_func, , [LIBTOOL_LIBOBJS="$LIBTOOL_LIBOBJS ${ac_func}.lo"])
12
AC_SUBST(LIBTOOL_LIBOBJS)dnl
16
dnl Check if gcc asm for i386 needs external symbols with an underscore.
17
dnl Peter Breitenlohner, April 15, 1996.
18
AC_DEFUN([pb_AC_ASM_UNDERSCORE],
20
AC_CACHE_CHECK(whether gcc asm needs underscore, pb_cv_asm_underscore,
22
# Older versions of GCC asm for i386 need an underscore prepended to
23
# external symbols. Figure out if this is so.
24
pb_cv_asm_underscore=yes
28
#if defined (__i386__) && defined (__GNUC__)
35
void sub () { val = 1; }
36
#endif /* assembler */
38
], [sub], pb_cv_asm_underscore=no)])
39
if test "x$pb_cv_asm_underscore" = xyes; then
40
AC_DEFINE(ASM_NEEDS_UNDERSCORE)
44
dnl Added /lib/... for A/UX.
45
dnl undefine([AC_PATH_X_DIRECT])dnl
47
dnl Changed make to ${MAKE-make}.
48
dnl undefine([AC_PATH_X_XMKMF])dnl
50
dnl Always more junk to check.
51
dnl undefine([AC_PATH_XTRA])dnl
53
dnl Added ac_include support.
54
dnl undefine([AC_OUTPUT_FILES])dnl
57
dnl From automake distribution, by Jim Meyering:
58
dnl Add --enable-maintainer-mode option to configure.
60
AC_DEFUN(AM_MAINTAINER_MODE,
61
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
62
dnl maintainer-mode is disabled by default
63
AC_ARG_ENABLE(maintainer-mode,
64
[ --enable-maintainer-mode enable make rules and dependencies not useful
65
(and sometimes confusing) to the casual installer],
66
USE_MAINTAINER_MODE=$enableval,
67
USE_MAINTAINER_MODE=no)
68
AC_MSG_RESULT($USE_MAINTAINER_MODE)
69
if test "x$USE_MAINTAINER_MODE" = xyes; then
78
dnl The following three macros are copied from Thomas Dickey's autoconf
80
dnl http://dickey.his.com/autoconf/autoconf.html
81
dnl --Roozbeh Pournader
83
define(AC_DIVERSION_HELP, 3)dnl user help-messages
84
define(ac_help_count, 0)dnl
86
dnl Send text to the user help-message list. We will expand it as a here-
87
dnl document, so we'll split it to avoid too-long strings.
88
dnl AC_DIVERT_HELP(message)
89
define(AC_DIVERT_HELP,
90
[AC_DIVERT_PUSH(AC_DIVERSION_HELP)dnl
91
ifelse(ac_help_count,0,[--enable and --with options recognized:
93
define([ac_help_count], builtin(eval, ac_help_count + 1))dnl
95
ifelse(ac_help_count,13,[EOF
97
define([ac_help_count], 1)dnl
102
AC_DEFUN(KPSE_STRUCT_ST_MTIM,
103
[AC_CACHE_CHECK([for st_mtim in struct stat], ac_cv_struct_st_mtim,
104
[AC_TRY_COMPILE([#include <sys/types.h>
105
#include <sys/stat.h>], [struct stat s; s.st_mtim;],
106
ac_cv_struct_st_mtim=yes, ac_cv_struct_st_mtim=no)])
107
if test $ac_cv_struct_st_mtim = yes; then
108
AC_DEFINE(HAVE_ST_MTIM)
112
# Find a program when cross-compiling, or use a default when not.
113
# $1 = variable which records the outcome
114
# $2 = program to look for when cross-compiling
115
# $3 = program to use when not cross-compiling
116
AC_DEFUN([KPSE_CROSS_PATH_PROG],
117
[if test "$cross_compiling" = yes; then
118
AC_PATH_PROG([$1], [$2])
119
if test -z "${$1}"; then
120
AC_MSG_ERROR([$2 was not found but is required when cross-compiling.
121
Install $2 or set \$$1 to the full pathname.])
127
# Set BUILD$1 to $2 when cross-compiling, to $($1) if not.
128
# Example: KPSE_CROSS_BUILD_VAR([CC], [cc]) sets 'BUILDCC' to 'cc'
129
# if cross-compiling, and to '$(CC)' if not.
130
AC_DEFUN([KPSE_CROSS_BUILD_VAR],
131
[if test "$cross_compiling" = yes; then
132
if test -z "${BUILD$1}"; then
135
AC_MSG_RESULT([setting \$BUILD$1 to ${BUILD$1}])
137
if test -n "${BUILD$1}"; then
138
AC_MSG_WARN([\$BUILD$1 set but not cross-compiling.])
145
dnl # Preparing for autoconf-2.5x:
147
dnl # As a first step towards autoconf-2.5x we define some new
148
dnl # autoconf-2.13 macros.
150
dnl # 2005-02-20 Peter Breitenlohner <peb@mppmu.mpg.de>
152
dnl # KPSE_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
153
dnl # ---------------------------------------------------
154
dnl # For now just an other name for AC_CONFIG_FILES, in future
155
dnl # (autoconf-2.5x) this will enable kpse_include substitution.
156
AC_DEFUN([KPSE_CONFIG_FILES], [AC_CONFIG_FILES([$1], [$2], [$3])])