source: trunk/third/gettext/configure.in @ 18455

Revision 18455, 7.1 KB checked in by ghudson, 21 years ago (diff)
Turn off Java stuff; Sun JVM doesn't work in chroot build area without /proc.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.52)
3AC_INIT
4AC_CONFIG_SRCDIR(src/msgfmt.c)
5AM_INIT_AUTOMAKE(gettext, 0.11.5)
6RELEASE_DATE=2002-08-06      dnl in "date +%Y-%m-%d" format
7AM_CONFIG_HEADER(config.h)
8
9dnl Checks for programs.
10AC_PROG_CC
11AC_PROG_INSTALL
12AC_PROG_YACC
13gt_PROG_LEX
14
15gt_GCJ
16if test -n "$HAVE_GCJ"; then
17  BUILDJAVAEXE=no
18else
19  BUILDJAVAEXE=no
20fi
21AC_SUBST(BUILDJAVAEXE)
22
23gt_JAVACOMP
24AC_CHECK_PROG(JAR, jar, jar)
25if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
26  BUILDJAVA=no
27else
28  BUILDJAVA=no
29fi
30AC_SUBST(BUILDJAVA)
31
32gt_JAVAEXEC
33if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
34  TESTJAVA=no
35else
36  TESTJAVA=no
37fi
38AC_SUBST(TESTJAVA)
39
40dnl Check for host type.
41AC_CANONICAL_HOST
42
43dnl Checks for UNIX variants that set DEFS,
44AC_ISC_POSIX
45
46dnl Checks for compiler output filename suffixes.
47AC_OBJEXT
48AC_EXEEXT
49
50dnl Check for build configuration.
51AC_LIBTOOL_WIN32_DLL
52AC_PROG_LIBTOOL
53
54AC_DEFINE(_GNU_SOURCE, 1, [Make sure we see all GNU extensions.])
55
56dnl Checks for libraries.
57
58dnl Checks for header files.
59AC_HEADER_STDC
60AC_CHECK_HEADERS(limits.h malloc.h string.h unistd.h values.h)
61gt_STDBOOL_H
62
63dnl Checks for typedefs, structures, and compiler characteristics.
64AC_C_CONST
65AC_C_INLINE
66bh_C_SIGNED
67AC_C_BACKSLASH_A
68jm_AC_TYPE_UNSIGNED_LONG_LONG
69AC_TYPE_OFF_T
70AC_TYPE_SIZE_T
71AC_CHECK_TYPES(ptrdiff_t)
72jm_AC_TYPE_UINTMAX_T
73gt_TYPE_SSIZE_T
74AC_TYPE_PID_T
75
76dnl Checks for library functions.
77AC_FUNC_ALLOCA
78AC_FUNC_VPRINTF
79AC_CHECK_FUNCS([getcwd mblen memcpy posix_spawn putc_unlocked raise select \
80strerror strtoul uname utime utimes])
81AC_REPLACE_FUNCS([memset stpcpy strcspn \
82strcasecmp strncasecmp strpbrk strstr vasprintf])
83AM_FUNC_GETLINE
84if test $am_cv_func_working_getline != yes; then
85  AC_CHECK_FUNCS(getdelim)
86fi
87gt_FUNC_FNMATCH
88jm_PREREQ_MBSWIDTH
89gt_PREREQ_BACKUPFILE
90AC_FUNC_VFORK
91gt_UNION_WAIT
92gt_TMPDIR
93gt_FUNC_MKDTEMP
94gt_SIGNALBLOCKING
95gt_SIGINFO
96gt_FUNC_SETENV
97gt_FUNC_ERROR_AT_LINE
98gt_SETLOCALE
99
100gt_PREREQ_HOSTNAME
101
102dnl These are the only lines required to internationalize the package.
103dnl (OK, not quite, the AC_OUTPUT has also some parts.)
104AM_GNU_GETTEXT(use-libtool, need-ngettext)
105
106dnl Put some default definitions into config.h.
107AH_TOP([
108/* Default value for alignment of strings in .mo file.  */
109#define DEFAULT_OUTPUT_ALIGNMENT 1
110
111#ifndef PARAMS
112# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
113#  define PARAMS(args) args
114# else
115#  define PARAMS(args) ()
116# endif
117#endif
118])
119AH_BOTTOM([
120/* We don't test for the basename function but still want to use the
121   version in the libc when compiling for a system using glibc.  Likewise
122   for stpncpy.  */
123#ifdef __GNU_LIBRARY__
124# define HAVE_BASENAME  1
125# define HAVE_STPNCPY   1
126#endif
127
128/* A file name cannot consist of any character possible.  INVALID_PATH_CHAR
129   contains the characters not allowed.  */
130#ifndef MSDOS
131# define        INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177/"
132#else
133/* Something like this for MSDOG.  */
134# define        INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177\\:."
135#endif
136
137/* This is the page width for the message_print function.  It should
138   not be set to more than 79 characters (Emacs users will appreciate
139   it).  It is used to wrap the msgid and msgstr strings, and also to
140   wrap the file position (#:) comments.  */
141#define PAGE_WIDTH 79
142
143/* Extra OS/2 (emx+gcc) defines.  */
144#ifdef __EMX__
145# include "intl/os2compat.h"
146#endif
147])
148
149dnl Check for the expat XML parser.
150dnl On operating systems where binary distribution vendors are likely to
151dnl ship both gettext and expat, we use dynamic loading to avoid a hard
152dnl dependency from gettext to expat.
153case "$host_os" in
154  linux*)
155    AC_DEFINE([DYNLOAD_LIBEXPAT], 1,
156      [Define to 1 if libexpat shall be dynamically loaded via dlopen().])
157    LIBEXPAT="-ldl"
158    LTLIBEXPAT="-ldl"
159    AC_SUBST(LIBEXPAT)
160    AC_SUBST(LTLIBEXPAT)
161    ;;
162  *)
163    AC_LIB_HAVE_LINKFLAGS([expat], [],
164      [#include <expat.h>], [XML_ExpatVersion();])
165    ;;
166esac
167
168dnl Check for Emacs and where to install .elc files.
169AM_PATH_LISPDIR
170
171aclocaldir='${datadir}/aclocal'
172AC_SUBST(aclocaldir)
173
174dnl Check for tools needed for formatting the documentation.
175ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
176AC_PATH_PROG(DVIPS, dvips, $ac_aux_dir_abs/missing dvips)
177AC_PATH_PROG(TEXI2PDF, texi2pdf, $ac_aux_dir_abs/missing texi2pdf)
178AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl)
179
180dnl Check for tools needed for formatting man pages.
181CROSS_COMPILING=$cross_compiling
182AC_SUBST(CROSS_COMPILING)
183
184dnl Checks for optional programs for the tests/lang-* tests.
185AC_CHECK_PROGS(CXX, $CCC c++ g++ gpp gcc CC cxx cc++ cl, :)
186if test "$CXX" != ":"; then
187  dnl Use a modified version of AC_PROG_CXX_WORKS that does not exit
188  dnl upon failure.
189  AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
190  AC_LANG_PUSH(C++)
191  AC_ARG_VAR([CXX], [C++ compiler command])
192  AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
193  echo 'int main () { return 0; }' > conftest.$ac_ext
194  if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
195    ac_cv_prog_cxx_works=yes
196    if (./conftest; exit) 2>/dev/null; then
197      ac_cv_prog_cxx_cross=no
198    else
199      ac_cv_prog_cxx_cross=yes
200    fi
201  else
202    ac_cv_prog_cxx_works=no
203  fi
204  rm -fr conftest*
205  AC_LANG_POP(C++)
206  AC_MSG_RESULT($ac_cv_prog_cxx_works)
207  if test $ac_cv_prog_cxx_works = no; then
208    CXX=:
209  fi
210fi
211
212dnl Checks for tests/rpathcfg.
213AC_SUBST(GCC)
214AC_SUBST(LD)
215AC_SUBST(with_gnu_ld)
216
217dnl Generate the version information file in the intl/ directory.
218test -d intl || mkdir intl
219echo "GNU gettext library from $PACKAGE-$VERSION" > intl/VERSION
220cat > intl/ChangeLog.inst <<EOF
221$RELEASE_DATE  GNU  <bug-gnu-gettext@gnu.org>
222
223        * Version $VERSION released.
224
225EOF
226
227dnl These ought to go away some day.
228changequote(,)dnl
229LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
230changequote([, ])dnl
231AC_SUBST(LTLIBOBJS)
232changequote(,)dnl
233LTALLOCA=`echo "$ALLOCA" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
234changequote([, ])dnl
235AC_SUBST(LTALLOCA)
236
237AC_OUTPUT([Makefile \
238           lib/Makefile lib/javacomp.sh lib/javaexec.sh \
239           intl/Makefile intl-java/Makefile \
240           libuniname/Makefile \
241           src/Makefile src/user-email \
242           po/Makefile.in \
243           doc/Makefile man/Makefile man/x-to-1 \
244           tests/Makefile \
245           m4/Makefile \
246           projects/Makefile \
247           misc/Makefile misc/gettextize misc/autopoint], [
248  dnl Fix unesthetic build commands generated by automake.
249  for m in lib/Makefile src/Makefile tests/Makefile; do
250    sed -e "s,\`test -f \\\$< || echo '\\\$(srcdir)/'\`\\\$<,\\\$<," < $m > $m.tmp
251    mv $m.tmp $m
252  done
253  dnl Fix an automake-1.5 bug.
254  for m in Makefile doc/Makefile; do
255    sed -e 's,^#distdir:,distdir:,' < $m > $m.tmp
256    mv $m.tmp $m
257  done
258  dnl Fix an automake-1.5 bug: all info files are erased by "make".
259  for m in doc/Makefile; do
260    sed -e '/cd \$(srcdir) && rm -f /d' < $m > $m.tmp
261    mv $m.tmp $m
262  done
263  dnl Fix permissions of misc/gettextize and misc/autopoint.
264  chmod a+x misc/gettextize misc/autopoint
265])
Note: See TracBrowser for help on using the repository browser.