~ubuntu-branches/ubuntu/jaunty/luatex/jaunty

« back to all changes in this revision

Viewing changes to src/texk/etc/autoconf/acsite.m4

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2007-09-24 12:56:11 UTC
  • Revision ID: james.westby@ubuntu.com-20070924125611-a8ge689azbptxvla
Tags: upstream-0.11.2
ImportĀ upstreamĀ versionĀ 0.11.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
4
 
 
5
 
 
6
dnl kb_AC_LIBTOOL_REPLACE_FUNCS(FUNCTION-NAME...)
 
7
AC_DEFUN(kb_AC_LIBTOOL_REPLACE_FUNCS,
 
8
[for ac_func in $1
 
9
do
 
10
AC_CHECK_FUNC($ac_func, , [LIBTOOL_LIBOBJS="$LIBTOOL_LIBOBJS ${ac_func}.lo"])
 
11
done
 
12
AC_SUBST(LIBTOOL_LIBOBJS)dnl
 
13
])
 
14
 
 
15
 
 
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],
 
19
[AC_REQUIRE_CPP()dnl
 
20
AC_CACHE_CHECK(whether gcc asm needs underscore, pb_cv_asm_underscore,
 
21
[
 
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
 
25
AC_TRY_LINK([
 
26
extern char val ;
 
27
extern void sub () ;
 
28
#if defined (__i386__) && defined (__GNUC__) 
 
29
asm("        .align 4\n"
 
30
".globl sub\n"
 
31
"sub:\n"
 
32
"        movb \$][1,val\n"
 
33
"        ret\n");
 
34
#else
 
35
void sub () { val = 1; }
 
36
#endif /* assembler */
 
37
char val ;
 
38
], [sub], pb_cv_asm_underscore=no)])
 
39
if test "x$pb_cv_asm_underscore" = xyes; then
 
40
  AC_DEFINE(ASM_NEEDS_UNDERSCORE)
 
41
fi
 
42
])
 
43
 
 
44
dnl Added /lib/... for A/UX.
 
45
dnl undefine([AC_PATH_X_DIRECT])dnl
 
46
 
 
47
dnl Changed make to ${MAKE-make}.
 
48
dnl undefine([AC_PATH_X_XMKMF])dnl
 
49
 
 
50
dnl Always more junk to check.
 
51
dnl undefine([AC_PATH_XTRA])dnl
 
52
 
 
53
dnl Added ac_include support.
 
54
dnl undefine([AC_OUTPUT_FILES])dnl
 
55
 
 
56
 
 
57
dnl From automake distribution, by Jim Meyering:
 
58
dnl Add --enable-maintainer-mode option to configure.
 
59
 
 
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
 
70
    MAINT=
 
71
  else
 
72
    MAINT='#M#'
 
73
  fi
 
74
  AC_SUBST(MAINT)dnl
 
75
]
 
76
)
 
77
 
 
78
dnl The following three macros are copied from Thomas Dickey's autoconf
 
79
dnl patches at:
 
80
dnl     http://dickey.his.com/autoconf/autoconf.html
 
81
dnl --Roozbeh Pournader
 
82
 
 
83
define(AC_DIVERSION_HELP, 3)dnl                user help-messages
 
84
define(ac_help_count, 0)dnl
 
85
 
 
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:
 
92
])dnl
 
93
define([ac_help_count], builtin(eval, ac_help_count + 1))dnl
 
94
[$1]
 
95
ifelse(ac_help_count,13,[EOF
 
96
cat <<EOF
 
97
define([ac_help_count], 1)dnl
 
98
])dnl
 
99
AC_DIVERT_POP()dnl
 
100
])
 
101
 
 
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)
 
109
fi
 
110
])
 
111
 
 
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.])
 
122
fi
 
123
else
 
124
  $1=$3
 
125
fi])
 
126
 
 
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
 
133
    BUILD$1='$2'
 
134
  fi
 
135
  AC_MSG_RESULT([setting \$BUILD$1 to ${BUILD$1}])
 
136
else
 
137
  if test -n "${BUILD$1}"; then
 
138
    AC_MSG_WARN([\$BUILD$1 set but not cross-compiling.])
 
139
  fi
 
140
  BUILD$1='$($1)'
 
141
fi
 
142
AC_SUBST(BUILD$1)
 
143
])
 
144
 
 
145
dnl # Preparing for autoconf-2.5x:
 
146
dnl #
 
147
dnl # As a first step towards autoconf-2.5x we define some new
 
148
dnl # autoconf-2.13 macros.
 
149
dnl #
 
150
dnl # 2005-02-20  Peter Breitenlohner  <peb@mppmu.mpg.de>
 
151
 
 
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])])