source: trunk/third/librep/configure.in @ 18402

Revision 18402, 18.0 KB checked in by ghudson, 22 years ago (diff)
Merge with librep 0.16.1.
Line 
1dnl  Process this file with autoconf to produce a configure script.
2dnl  Copyright (C) 1998 John Harper <john@dcs.warwick.ac.uk>
3dnl  $Id: configure.in,v 1.5 2003-01-05 00:27:58 ghudson Exp $
4dnl
5dnl  This file is part of librep.
6dnl
7dnl  librep is free software; you can redistribute it and/or modify it
8dnl  under the terms of the GNU General Public License as published by
9dnl  the Free Software Foundation; either version 2, or (at your option)
10dnl  any later version.
11dnl
12dnl  librep is distributed in the hope that it will be useful, but
13dnl  WITHOUT ANY WARRANTY; without even the implied warranty of
14dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15dnl  GNU General Public License for more details.
16dnl
17dnl  You should have received a copy of the GNU General Public License
18dnl  along with librep; see the file COPYING.  If not, write to
19dnl  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21AC_REVISION($Revision: 1.5 $)
22
23AC_INIT(src/rep_subrs.h)
24AC_CONFIG_HEADER(config.h src/rep_config.h)
25
26dnl Release versioning info
27version="0.16.1"
28
29dnl libtool versioning info: `CURRENT:REVISION:AGE'. CURRENT is the
30dnl current interface id, REVISION is the version number of this
31dnl implementation, AGE defines the first interface id also supported
32dnl (i.e. all interfaces between CURRENT-AGE and CURRENT are supported)
33libcurrent=12
34librevision=0
35libage=3
36libversion="$libcurrent:$librevision:$libage"
37
38makefile_template="Makefile.in:Makedefs.in"
39output_files="src/Makefile:Makedefs.in:src/Makefile.in\
40 lisp/Makefile:Makedefs.in:lisp/Makefile.in\
41 Makefile:Makedefs.in:Makefile.in\
42 man/Makefile:Makedefs.in:man/Makefile.in\
43 intl/Makefile librep.spec"
44
45dnl Find the system type
46AC_CANONICAL_HOST
47
48dnl Remove trailing slash in $prefix if necessary
49case "${prefix}" in
50  */)
51    prefix=`echo ${prefix} | sed -e 's/^\(.*\)\/$/\1/'`
52    ;;
53esac
54
55repdir='${datadir}/rep'
56replispdir='${repdir}/${version}/lisp'
57repexecdir='${libexecdir}/rep/${version}/${host_type}'
58repcommonexecdir='${libexecdir}/rep/${host_type}'
59repdocfile='${repexecdir}/DOC'
60
61emacssitelispdir='${datadir}/emacs/site-lisp'
62
63EXTRA_LIBOBJS=""
64AC_SUBST(EXTRA_LIBOBJS)
65
66dnl Checks for programs.
67AC_PROG_CC
68AC_ISC_POSIX
69AC_PROG_CPP
70AC_PROG_INSTALL
71AC_PROG_LN_S
72AC_PROG_MAKE_SET
73AC_PROG_GCC_TRADITIONAL
74
75AC_DISABLE_STATIC
76AM_PROG_LIBTOOL
77
78dnl Abort if shared libraries aren't enabled
79if test "${enable_shared}" != "yes"; then
80  AC_MSG_ERROR([Need shared libraries enabled])
81fi
82
83dnl Checks for libraries.
84AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
85AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
86AC_CHECK_FUNC(dlopen, , AC_CHECK_LIB(dl, dlopen))
87
88dnl Checks for header files.
89AC_HEADER_DIRENT
90AC_HEADER_STDC
91AC_HEADER_SYS_WAIT
92AC_HEADER_TIME
93AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h sys/utsname.h unistd.h siginfo.h memory.h stropts.h termios.h string.h limits.h argz.h locale.h nl_types.h malloc.h sys/param.h)
94
95dnl Check for GNU MP library and header files
96AC_ARG_WITH(gmp,
97 [  --without-gmp                 Don't use GMP for bignum/rational numbers],
98 [], [with_gmp=maybe])
99
100GMP_LIBS="-lm"
101if test "$with_gmp" != "no"; then
102  AC_ARG_WITH(gmp-prefix, [  --with-gmp-prefix=DIR   path to GMP],
103   [if test "$withval" != "no"; then
104      CPPFLAGS="${CPPFLAGS} -I$withval/include"
105      LDFLAGS="${LDFLAGS} -L$withval/lib"
106    fi],
107   dnl debian brain-damage
108   [if test -d /usr/include/gmp2; then
109      CPPFLAGS="${CPPFLAGS} -I/usr/include/gmp2"
110    fi])
111
112  found_gmp=no
113  AC_CHECK_HEADER(gmp.h,
114    [AC_CHECK_LIB(gmp, mpz_init,
115       [GMP_LIBS="-lgmp -lm"; found_gmp=yes],
116       [AC_CHECK_LIB(gmp, __gmpz_init,
117          [GMP_LIBS="-lgmp -lm"; found_gmp=yes])])])
118
119  if test "$found_gmp" = "yes"; then
120    AC_DEFINE(HAVE_GMP)
121    _libs="$LIBS"
122    LIBS="$LIBS $GMP_LIBS"
123    AC_CHECK_FUNC(__gmp_randinit, AC_DEFINE(HAVE_GMP_RANDINIT))
124    LIBS="$_libs"
125  elif test "$with_gmp" != "no"; then
126    AC_MSG_ERROR([Can't find GMP (--without-gmp for cut-down non-GMP build)])
127  fi
128fi
129AC_SUBST(GMP_LIBS)
130
131dnl Check for GNU DBM library and header files
132AC_ARG_WITH(gdbm-prefix,
133[  --with-gdbm-prefix=DIR  path to GDBM],[
134  if test "$withval" != "no"; then
135    CPPFLAGS="${CPPFLAGS} -I$withval/include"
136    LDFLAGS="${LDFLAGS} -L$withval/lib"
137  fi
138])
139AC_CHECK_HEADER(gdbm.h,
140    AC_CHECK_LIB(gdbm, gdbm_open, GDBM_LIBS="-lgdbm",
141        AC_MSG_ERROR(Cannot find GDBM library)),
142    AC_MSG_ERROR(Cannot find GDBM header))
143AC_SUBST(GDBM_LIBS)
144
145dnl Check for Doug Lea's malloc in libc
146doug_lea_malloc=yes
147AC_CHECK_FUNC(malloc_get_state, , doug_lea_malloc=no)
148AC_CHECK_FUNC(malloc_set_state, , doug_lea_malloc=no)
149if test "$doug_lea_malloc" = "no"; then
150  dnl We used to compile our own version of dlmalloc on most
151  dnl platforms that didn't have it in their libc. But the list
152  dnl of exceptions was growing too long..
153  AC_DEFINE(LIBC_MALLOC)
154else
155  AC_DEFINE(DOUG_LEA_MALLOC)
156  AC_DEFINE(LIBC_MALLOC)
157fi
158
159dnl Check for readline
160AC_ARG_WITH(readline,
161 [  --with-readline         support fancy command input editing
162  --without-readline      Don't use readline], [], [with_readline=maybe])
163
164if test "$with_readline" != "no"; then
165  AC_ARG_WITH(readline-prefix,
166  [  --with-readline-prefix=DIR path to readline],
167  [ if test "$withval" != "no" -a "$withval" != "yes"; then
168    # Save in case test with directory specified fails
169    _cppflags=${CPPFLAGS}
170    _ldflags=${LDFLAGS}
171
172    CPPFLAGS="${CPPFLAGS} -I$withval/include"
173    LDFLAGS="${LDFLAGS} -L$withval/lib"
174  fi ])
175
176  dnl check for terminal library
177  dnl this is a very cool solution from octave's configure.in
178  unset tcap
179  for termlib in ncurses curses termcap terminfo termlib; do
180    AC_CHECK_LIB(${termlib}, tputs, [tcap="$tcap -l$termlib"])
181    case "$tcap" in
182      *-l${termlib}*)
183        break
184      ;;
185    esac
186  done
187
188  AC_CHECK_HEADER(readline/readline.h,
189    AC_CHECK_LIB(readline, readline,[
190      READLINE_LIBS="-lreadline $tcap"
191      AC_DEFINE(HAVE_LIBREADLINE)], , $tcap))
192
193  if test -z "$READLINE_LIBS"; then
194    if test "$with_readline_prefix" = "yes"; then
195      AC_MSG_ERROR([Can't find readline libraries])
196    else
197      CPPFLAGS=${_cppflags}
198      LDFLAGS=${_ldflags}
199    fi
200  fi
201fi
202AC_SUBST(READLINE_LIBS)
203
204dnl Check for dynamic loading
205AC_CHECK_HEADER(dlfcn.h, [AC_DEFINE(HAVE_DLFCN_H)])
206AC_CHECK_HEADER(dl.h, [AC_DEFINE(HAVE_DL_H)])
207AC_CHECK_HEADER(sys/dl.h, [AC_DEFINE(HAVE_SYS_DL_H)])
208dl_ok=no
209AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN) dl_ok=dl],
210    AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_DLOPEN) dl_ok=dl]))
211AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD) dl_ok=shl],
212    AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_DLOPEN) dl_ok=shl]))
213
214if test $dl_ok = dl; then
215  AC_MSG_CHECKING([for preceding underscore in symbols])
216  dnl copied from glib configure.in
217  AC_TRY_RUN([#ifdef HAVE_DLFCN_H
218              # include <dlfcn.h>
219              #endif
220              int glib_underscore_test (void) { return 42; }
221              int main() {
222                void *f1 = (void*)0, *f2 = (void*)0, *handle;
223                handle = dlopen ((void*)0, 0);
224                if (handle) {
225                  f1 = dlsym (handle, "glib_underscore_test");
226                  f2 = dlsym (handle, "_glib_underscore_test");
227                } return (!f2 || f1);
228              }],
229              [AC_DEFINE(DLSYM_NEED_USCORE)
230               AC_MSG_RESULT(yes)],
231              [AC_MSG_RESULT(no)])
232
233  dnl RTLD_GLOBAL is broken for Tru64 UNIX V5.0 and V5.0A, such that
234  dnl   xh = dlopen("libx.so", RTLD_GLOBAL|RTLD_LAZY); /* provides func */
235  dnl   yh = dlopen("liby.so", RTLD_GLOBAL|RTLD_LAZY); /* provides func */
236  dnl   yf = dlsym(yh, "func"); /* Error: returns func from libx.so */
237  dnl It's hard to test for this apart from the version string, so
238  dnl that's what we use.
239  case ${host} in
240    *-dec-osf5*)
241      AC_MSG_CHECKING([for broken RTLD_GLOBAL on Tru64])
242      if /usr/sbin/sizer -v | grep -E -q -e 'UNIX [[TVX]]5\.0A?(-[[[:digit:]]]+)? '; then
243          AC_DEFINE(BROKEN_RTLD_GLOBAL)
244          AC_MSG_RESULT(yes)
245      else
246          AC_MSG_RESULT(no)
247      fi
248      ;;
249  esac
250fi
251
252if test $dl_ok != no; then
253  AC_DEFINE(HAVE_DYNAMIC_LOADING)
254else
255  AC_MSG_ERROR([can't figure out how to do dynamic loading])
256fi
257
258dnl Checks for typedefs, structures, and compiler characteristics.
259AC_C_CONST
260AC_C_INLINE
261AC_TYPE_OFF_T
262AC_TYPE_PID_T
263AC_TYPE_SIZE_T
264AC_TYPE_SIGNAL
265
266dnl Checks for library functions.
267AC_FUNC_ALLOCA
268AC_FUNC_MMAP
269AC_FUNC_MEMCMP
270AC_FUNC_VPRINTF
271AC_CHECK_FUNCS(getcwd gethostname select socket strcspn strerror strstr stpcpy strtol psignal strsignal snprintf grantpt lrand48 getpagesize setitimer dladdr dlerror munmap putenv setenv setlocale strchr strcasecmp strncasecmp strdup __argz_count __argz_stringify __argz_next siginterrupt gettimeofday strtoll strtoq)
272AC_REPLACE_FUNCS(realpath)
273
274dnl check for crypt () function
275AC_CHECK_FUNC(crypt, [AC_DEFINE(HAVE_CRYPT)],
276    AC_CHECK_LIB(crypt, crypt, [AC_DEFINE(HAVE_CRYPT)
277                                LIBS="$LIBS -lcrypt"]))
278
279dnl Custom tests
280
281dnl How do we get dependency lines in the Makefile?
282if test "x${GCC}" = "xyes"; then
283  MAKEDEP='$(CC) -MM'
284else
285  case ${host} in
286    *-dec-osf*)
287      dnl works on Tru64
288      MAKEDEP='$(CC) -M'
289      ;;
290    *-sun-solaris*)
291      dnl works on Solaris
292      MAKEDEP='/usr/ccs/lib/cpp -M'
293      ;;
294    *)
295      dnl disable dependences?
296      MAKEDEP='true'
297      ;;
298  esac
299fi
300AC_SUBST(MAKEDEP)
301
302dnl If using GCC and it doesn't look as though the cflags have been
303dnl set explicitly, add some warning options.
304if test "x${GCC}" = "xyes" -a "x$CFLAGS" = "x-g -O2"; then
305  CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wmissing-prototypes"
306  case ${host} in
307    *-sun-solaris*)
308      dnl Turn off implicit-int warnings since the X11 includes
309      dnl on Solaris generate a lot of these
310      CFLAGS="${CFLAGS} -Wno-implicit-int"
311      ;;
312  esac
313fi
314
315AC_ARG_WITH(extra-cflags,
316  [  --with-extra-cflags=FLAGS Extra flags to pass to C compiler],
317  CFLAGS="${CFLAGS} $with_extra_cflags")
318
319dnl Does <unistd.h> declare char **environ?
320AC_CACHE_CHECK([whether unistd.h declares environ], jade_cv_decl_environ,
321 AC_TRY_COMPILE([#include <unistd.h>], [char **foo = environ;],
322  [jade_cv_decl_environ=yes],
323  [jade_cv_decl_environ=no]))
324if test ${jade_cv_decl_environ} = no; then
325  AC_DEFINE(ENVIRON_UNDECLARED)
326fi
327
328dnl Are ptys available, and if so, how?
329AC_MSG_CHECKING([whether /dev/ptmx exists])
330if test -r /dev/ptmx; then
331  AC_MSG_RESULT([yes])
332  AC_DEFINE(HAVE_PTYS)
333  AC_DEFINE(HAVE_DEV_PTMX)
334else
335  AC_MSG_RESULT([no])
336fi
337
338dnl Look for old-style /dev/ptyXN devices
339AC_CACHE_CHECK([whether /dev/ptyXN devices exist], jade_cv_sys_dev_pty,
340 jade_cv_sys_dev_pty=no
341 for c in p q r s t u v w x y z a b c d e f g h i j k l m n o; do
342   if test -r "/dev/pty${c}0"; then
343     jade_cv_sys_dev_pty=${c}
344     break
345   fi
346 done)
347if test ${jade_cv_sys_dev_pty} != no; then
348  AC_DEFINE(HAVE_PTYS)
349  AC_DEFINE_UNQUOTED(FIRST_PTY_LETTER, '${jade_cv_sys_dev_pty}')
350fi
351
352dnl Try to find the aclocal directory for installation
353aclocaldir=none
354AC_ARG_WITH(aclocaldir,
355  [  --with-aclocaldir=DIR   Directory in which to install autoconf macros],
356  aclocaldir=$withval)
357AC_MSG_CHECKING([for aclocal directory])
358if test "$aclocaldir" = none; then
359  aclocaldir="`aclocal --print-ac-dir 2>/dev/null`"
360  if test "x${aclocaldir}" = "x"; then
361    aclocaldir='${datadir}/aclocal'
362  fi
363fi
364AC_MSG_RESULT([${aclocaldir}])
365AC_SUBST(aclocaldir)
366
367AC_ARG_ENABLE(continuations,
368 [  --disable-continuations Don't include support for continuations
369                           or multi-threading],
370 [if test "$enableval" != "no"; then AC_DEFINE(WITH_CONTINUATIONS) fi],
371 [AC_DEFINE(WITH_CONTINUATIONS)])
372
373AC_ARG_ENABLE(dballoc,
374 [  --enable-dballoc      Trace all memory allocations],
375 [if test "$enableval" != "no"; then AC_DEFINE(DEBUG_SYS_ALLOC) fi])
376
377AC_ARG_ENABLE(dbsyms,
378 [  --disable-dbsyms      When writing debug output, don't translate
379                           addresses to symbol names],
380 [if test "$enableval" != "no"; then AC_DEFINE(DB_RESOLVE_SYMBOLS) fi],
381 [AC_DEFINE(DB_RESOLVE_SYMBOLS)])
382
383AC_ARG_ENABLE(gprof,
384 [  --enable-gprof        Build for gprof (needs --enable-static)],
385 [CFLAGS="${CFLAGS} -pg"; LDFLAGS="${LDFLAGS} -pg"])
386
387AC_ARG_ENABLE(full-name-terminator,
388 [  --enable-full-name-terminator=C Full name in gecos field of passwd
389                           file is terminated by first C character],
390 [if test "$enableval" != "no"; then
391   enableval="'$enableval'"
392   AC_DEFINE_UNQUOTED(FULL_NAME_TERMINATOR, $enableval)
393  fi])
394
395dnl Assumption for now
396HAVE_UNIX=1
397AC_DEFINE(rep_HAVE_UNIX, 1)
398
399dnl We need to find an integer type that's big enough to store any pointer
400AC_MSG_CHECKING([for data type to store Lisp values])
401AC_ARG_WITH(value-type,
402 [  --with-value-type=TYPE  Implicitly signed integer type, at least as wide
403                           as a pointer. [TYPE=<probed>] (see README)], [],
404 [with_value_type="undef"])
405if test "${with_value_type}" = "undef"; then
406  AC_TRY_RUN([main () { exit (!(sizeof (int) >= sizeof (void *)));}],
407             [with_value_type=int])
408fi
409if test "${with_value_type}" = "undef"; then
410  AC_TRY_RUN([main () { exit (!(sizeof (long int) >= sizeof (void *)));}],
411             [with_value_type="long int"])
412fi
413if test "${with_value_type}" = "undef"; then
414  AC_TRY_RUN([main () { exit (!(sizeof (long long int) >= sizeof (void *)));}],
415             [with_value_type="long long int"])
416fi
417if test "${with_value_type}" = "undef"; then
418  AC_MSG_ERROR([can't find Lisp value type; set --with-value-type (see README)])
419fi
420AC_MSG_RESULT([${with_value_type}])
421AC_DEFINE_UNQUOTED(rep_PTR_SIZED_INT, ${with_value_type})
422
423dnl Find the size (in bits) of the chosen value type
424AC_MSG_CHECKING([for size of Lisp value type])
425AC_ARG_WITH(value-sizeof,
426 [  --with-value-sizeof=N   Size (in bytes) of value type. [N=<probed>]], [],
427 [with_value_sizeof="undef"])
428if test "${with_value_sizeof}" = "undef"; then
429  dnl the following fragment is inspired by AC_CHECK_SIZEOF
430  AC_TRY_RUN([#include <stdio.h>
431              main () {
432                FILE *f = fopen ("conftestval", "w");
433                if (!f) exit (1);
434                fprintf (f, "%d\n", sizeof (${with_value_type}));
435                exit (0);
436              }],
437              [ with_value_sizeof=`cat conftestval`; rm -f conftestval])
438fi
439AC_MSG_RESULT([${with_value_sizeof} bytes])
440AC_DEFINE_UNQUOTED(rep_PTR_SIZED_INT_SIZEOF, ${with_value_sizeof})
441
442dnl What's the suffix to get an integer constant of the above size?
443AC_MSG_CHECKING([for value type constant suffix])
444case "${with_value_type}" in
445  "long long int"|"long long")
446    rep_value_suffix=LL
447    ;;
448  *)
449    dnl We should be okay to default to longs..
450    rep_value_suffix=L
451    ;;
452esac
453AC_MSG_RESULT([${rep_value_suffix}])
454AC_DEFINE_UNQUOTED(rep_PTR_SIZED_INT_SUFFIX, ${rep_value_suffix})
455
456dnl What's the printf integer conversion for this type?
457AC_MSG_CHECKING([for value type printf conversion])
458case "${with_value_type}" in
459  "long long int"|"long long")
460    dnl other options would be L or q!?
461    rep_value_conv=ll
462    ;;
463  long|"long int")
464    rep_value_conv=l
465    ;;
466  *)
467    rep_value_conv=
468    ;;
469esac
470AC_MSG_RESULT([${rep_value_conv}])
471AC_DEFINE_UNQUOTED(rep_PTR_SIZED_INT_CONV, "${rep_value_conv}")
472
473dnl Check for size of long
474AC_CHECK_SIZEOF(long)
475
476dnl Check if `long long int' is available, also check it's size, if not
477dnl available, then set it's size to the same as long
478AC_MSG_CHECKING([for long long int])
479AC_TRY_COMPILE([],[long long int foo = 42;],
480               [AC_MSG_RESULT(yes)
481                AC_DEFINE(rep_HAVE_LONG_LONG,1)
482                AC_CHECK_SIZEOF(long long)],
483               [AC_MSG_RESULT(no)
484                AC_DEFINE(SIZEOF_LONG_LONG,SIZEOF_LONG)])
485
486
487dnl This is the malloc granularity. It's unlikely that anything has
488dnl less alignment than the default value of the number of bytes in
489dnl the value type
490AC_ARG_WITH(malloc-alignment,
491 [  --with-malloc-alignment=BYTES Must be less than or equal to the alignment
492                           returned by the malloc function. [BYTES=N]], [],
493 [with_malloc_alignment=${with_value_sizeof}])
494AC_DEFINE_UNQUOTED(rep_MALLOC_ALIGNMENT, ${with_malloc_alignment})
495
496dnl Check for gcc crashes on alpha (seems to be fixed in new snapshots, but
497dnl just to make it compile on all machines)
498if test "x${GCC}" = "xyes"; then
499  AC_MSG_CHECKING([for broken alpha gcc])
500  AC_TRY_COMPILE([],[__builtin_return_address(1);],
501                 [AC_MSG_RESULT(no)],
502                 [AC_DEFINE(BROKEN_ALPHA_GCC,1)
503                  AC_MSG_RESULT(yes)
504                  AC_MSG_WARN([Backtrace support will not be compiled])])
505fi
506
507AC_MSG_CHECKING([for stack growth direction])
508AC_ARG_WITH(stack-direction,
509 [  --with-stack-direction=DIR Stack growth direction. -1 for downwards,
510                           +1 for upwards.],
511 [AC_MSG_RESULT(${with_stack_direction})],
512 [with_stack_direction=unknown])
513if test "${with_stack_direction}" = unknown; then
514  case ${host_cpu} in
515    sparc|i?86)
516      AC_MSG_RESULT([assuming downwards])
517      with_stack_direction="-1"
518      ;;
519    dnl any other known stack directions..?
520  esac
521fi
522if test "${with_stack_direction}" = unknown; then
523  AC_TRY_RUN([ void inner (char *foo) { char bar; exit (!(foo >= &bar)); }
524               void main () { char foo; inner (&foo); } ],
525   [AC_MSG_RESULT([downwards])
526    with_stack_direction=-1],
527   [AC_MSG_RESULT([upwards])
528    with_stack_direction=+1])
529fi
530if test "${with_stack_direction}" != unknown; then
531  AC_DEFINE_UNQUOTED(STACK_DIRECTION, ${with_stack_direction})
532fi
533
534dnl Nonstandard exported symbols
535AC_SUBST(version)
536AC_SUBST(libversion)
537AC_SUBST(repdir)
538AC_SUBST(repexecdir)
539AC_SUBST(repcommonexecdir)
540AC_SUBST(replispdir)
541AC_SUBST(repdocfile)
542AC_SUBST(emacssitelispdir)
543AC_SUBST(HAVE_UNIX)
544AC_SUBST(HAVE_X11)
545
546AC_DEFINE_UNQUOTED(rep_VERSION, "${version}")
547AC_DEFINE_UNQUOTED(rep_INTERFACE, ${libcurrent})
548
549dnl Hacks for libintl
550AM_LC_MESSAGES
551VERSION="$version"
552PACKAGE="librep"
553DATADIRNAME="share"
554MKINSTALLDIRS='${top_srcdir}/mkinstalldirs'
555INTLOBJS="\$(GETTOBJS)"
556GT_YES='#'
557GT_NO=''
558l=l
559AC_SUBST(VERSION)
560AC_SUBST(PACKAGE)
561AC_SUBST(DATADIRNAME)
562AC_SUBST(MKINSTALLDIRS)
563AC_SUBST(INTLOBJS)
564AC_SUBST(GT_YES)
565AC_SUBST(GT_NO)
566AC_SUBST(l)
567
568dnl If it looks like GNU gettext is in libc, don't compile a local copy
569USE_INCLUDED_LIBINTL=yes
570AC_SUBST(USE_INCLUDED_LIBINTL)
571AC_CHECK_FUNC(_nl_msg_cat_cntr,
572 [AC_DEFINE(LIBC_GETTEXT)
573  AC_CHECK_HEADERS(libintl.h)
574  USE_INCLUDED_LIBINTL=no])
575
576dnl Build all files. Makes sure rules.mk is rebuild each time
577AC_OUTPUT(${output_files}, [rm -f rules.mk])
578
579dnl If it doesn't look like GNU Make is being used, give a friendly warning
580tem=`make --version -f /dev/null 2>&1 | grep GNU`
581if test "x$tem" = "x"; then
582  AC_MSG_WARN([You need to use GNU Make when compiling])
583fi
584
585dnl Local variables:
586dnl major-mode: sh-mode
587dnl End:
Note: See TracBrowser for help on using the repository browser.