Commit | Line | Data |
---|---|---|
7a5ab369 LC |
1 | dnl -*- Autoconf -*- |
2 | ||
3d9f7bd5 TTN |
3 | dnl Copyright (C) 1997, 1999, 2000, 2001, 2002, 2004, 2006, |
4 | dnl 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | |
5 | dnl | |
6 | dnl This file is part of GUILE | |
7 | dnl | |
8 | dnl GUILE is free software; you can redistribute it and/or modify it under | |
9 | dnl the terms of the GNU Lesser General Public License as published by the | |
10 | dnl Free Software Foundation; either version 3, or (at your option) any | |
11 | dnl later version. | |
12 | dnl | |
13 | dnl GUILE is distributed in the hope that it will be useful, but WITHOUT | |
14 | dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 | dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
16 | dnl License for more details. | |
17 | dnl | |
18 | dnl You should have received a copy of the GNU Lesser General Public | |
19 | dnl License along with GUILE; see the file COPYING.LESSER. If not, write | |
20 | dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth | |
21 | dnl Floor, Boston, MA 02110-1301, USA. | |
22 | ||
23 | ||
3a629497 JB |
24 | dnl On the NeXT, #including <utime.h> doesn't give you a definition for |
25 | dnl struct utime, unless you #define _POSIX_SOURCE. | |
26 | ||
d70e0619 | 27 | AC_DEFUN([GUILE_STRUCT_UTIMBUF], [ |
3a629497 JB |
28 | AC_CACHE_CHECK([whether we need POSIX to get struct utimbuf], |
29 | guile_cv_struct_utimbuf_needs_posix, | |
30 | [AC_TRY_CPP([ | |
31 | #ifdef __EMX__ | |
32 | #include <sys/utime.h> | |
33 | #else | |
34 | #include <utime.h> | |
35 | #endif | |
36 | struct utime blah; | |
37 | ], | |
38 | guile_cv_struct_utimbuf_needs_posix=no, | |
39 | guile_cv_struct_utimbuf_needs_posix=yes)]) | |
40 | if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then | |
e103c6b4 RB |
41 | AC_DEFINE([UTIMBUF_NEEDS_POSIX], 1, |
42 | [Define this if <utime.h> doesn't define struct utimbuf unless | |
43 | _POSIX_SOURCE is defined. See GUILE_STRUCT_UTIMBUF in aclocal.m4.]) | |
3a629497 JB |
44 | fi]) |
45 | ||
46 | ||
47 | ||
48 | ||
49 | dnl | |
50 | dnl Apparently, at CMU they have a weird version of libc.h that is | |
51 | dnl installed in /usr/local/include and conflicts with unistd.h. | |
52 | dnl In these situations, we should not #include libc.h. | |
53 | dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is | |
54 | dnl present on the system, and is safe to #include. | |
55 | dnl | |
56 | AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD], | |
57 | [ | |
58 | AC_CHECK_HEADERS(libc.h unistd.h) | |
59 | AC_CACHE_CHECK( | |
3d77146f | 60 | [whether libc.h and unistd.h can be included together], |
3a629497 JB |
61 | guile_cv_header_libc_with_unistd, |
62 | [ | |
63 | if test "$ac_cv_header_libc_h" = "no"; then | |
64 | guile_cv_header_libc_with_unistd="no" | |
42d0ffc9 | 65 | elif test "$ac_cv_header_unistd_h" = "no"; then |
3a629497 JB |
66 | guile_cv_header_libc_with_unistd="yes" |
67 | else | |
68 | AC_TRY_COMPILE( | |
69 | [ | |
70 | # include <libc.h> | |
71 | # include <unistd.h> | |
72 | ], | |
73 | [], | |
74 | [guile_cv_header_libc_with_unistd=yes], | |
75 | [guile_cv_header_libc_with_unistd=no] | |
76 | ) | |
77 | fi | |
78 | ] | |
79 | ) | |
80 | if test "$guile_cv_header_libc_with_unistd" = yes; then | |
feef98f2 | 81 | AC_DEFINE([LIBC_H_WITH_UNISTD_H], 1, |
e103c6b4 RB |
82 | [Define this if we should include <libc.h> when we've already |
83 | included <unistd.h>. On some systems, they conflict, and libc.h | |
84 | should be omitted. See GUILE_HEADER_LIBC_WITH_UNISTD in | |
85 | aclocal.m4.]) | |
3a629497 JB |
86 | fi |
87 | ] | |
88 | ) | |
0b89e78e MD |
89 | |
90 | ||
91 | ||
92 | dnl This is needed when we want to check for the same function repeatedly | |
93 | dnl with other parameters, such as libraries, varying. | |
94 | dnl | |
95 | dnl GUILE_NAMED_CHECK_FUNC(FUNCTION, TESTNAME, | |
96 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | |
d70e0619 | 97 | AC_DEFUN([GUILE_NAMED_CHECK_FUNC], |
0b89e78e MD |
98 | [AC_MSG_CHECKING([for $1]) |
99 | AC_CACHE_VAL(ac_cv_func_$1_$2, | |
100 | [AC_TRY_LINK( | |
101 | dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h> | |
102 | dnl which includes <sys/select.h> which contains a prototype for | |
103 | dnl select. Similarly for bzero. | |
104 | [/* System header to define __stub macros and hopefully few prototypes, | |
105 | which can conflict with char $1(); below. */ | |
106 | #include <assert.h> | |
107 | /* Override any gcc2 internal prototype to avoid an error. */ | |
ee79b9ff | 108 | #ifdef __cplusplus |
0b89e78e MD |
109 | extern "C" |
110 | #endif | |
ee79b9ff | 111 | /* We use char because int might match the return type of a gcc2 |
0b89e78e MD |
112 | builtin and then its argument prototype would still apply. */ |
113 | char $1(); | |
114 | ], [ | |
115 | /* The GNU C library defines this for functions which it implements | |
116 | to always fail with ENOSYS. Some functions are actually named | |
117 | something starting with __ and the normal name is an alias. */ | |
118 | #if defined (__stub_$1) || defined (__stub___$1) | |
119 | choke me | |
120 | #else | |
121 | $1(); | |
122 | #endif | |
123 | ], eval "ac_cv_func_$1_$2=yes", eval "ac_cv_func_$1_$2=no")]) | |
124 | if eval "test \"`echo '$ac_cv_func_'$1'_'$2`\" = yes"; then | |
125 | AC_MSG_RESULT(yes) | |
126 | ifelse([$3], , :, [$3]) | |
127 | else | |
128 | AC_MSG_RESULT(no) | |
129 | ifelse([$4], , , [$4 | |
130 | ])dnl | |
131 | fi | |
132 | ]) | |
75bfae86 MV |
133 | |
134 | ||
135 | ||
136 | ||
d79a62db NJ |
137 | dnl Available from the Autoconf Macro Archive at: |
138 | dnl http://autoconf-archive.cryp.to/acx_pthread.html | |
75bfae86 MV |
139 | dnl |
140 | AC_DEFUN([ACX_PTHREAD], [ | |
141 | AC_REQUIRE([AC_CANONICAL_HOST]) | |
142 | AC_LANG_SAVE | |
143 | AC_LANG_C | |
144 | acx_pthread_ok=no | |
145 | ||
146 | # We used to check for pthread.h first, but this fails if pthread.h | |
147 | # requires special compiler flags (e.g. on True64 or Sequent). | |
148 | # It gets checked for in the link test anyway. | |
149 | ||
150 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
151 | # etcetera environment variables, and if threads linking works using | |
152 | # them: | |
153 | if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then | |
154 | save_CFLAGS="$CFLAGS" | |
155 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
156 | save_LIBS="$LIBS" | |
157 | LIBS="$PTHREAD_LIBS $LIBS" | |
158 | AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) | |
159 | AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) | |
160 | AC_MSG_RESULT($acx_pthread_ok) | |
161 | if test x"$acx_pthread_ok" = xno; then | |
162 | PTHREAD_LIBS="" | |
163 | PTHREAD_CFLAGS="" | |
164 | fi | |
165 | LIBS="$save_LIBS" | |
166 | CFLAGS="$save_CFLAGS" | |
167 | fi | |
168 | ||
169 | # We must check for the threads library under a number of different | |
170 | # names; the ordering is very important because some systems | |
171 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
172 | # libraries is broken (non-POSIX). | |
173 | ||
174 | # Create a list of thread flags to try. Items starting with a "-" are | |
175 | # C compiler flags, and other items are library names, except for "none" | |
176 | # which indicates that we try without any flags at all, and "pthread-config" | |
177 | # which is a program returning the flags for the Pth emulation library. | |
178 | ||
179 | acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
180 | ||
181 | # The ordering *is* (sometimes) important. Some notes on the | |
182 | # individual items follow: | |
183 | ||
184 | # pthreads: AIX (must check this before -lpthread) | |
185 | # none: in case threads are in libc; should be tried before -Kthread and | |
186 | # other compiler flags to prevent continual compiler warnings | |
187 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
188 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
189 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
190 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) | |
191 | # -pthreads: Solaris/gcc | |
192 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
193 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
194 | # doesn't hurt to check since this sometimes defines pthreads too; | |
195 | # also defines -D_REENTRANT) | |
d79a62db | 196 | # ... -mt is also the pthreads flag for HP/aCC |
75bfae86 MV |
197 | # pthread: Linux, etcetera |
198 | # --thread-safe: KAI C++ | |
199 | # pthread-config: use pthread-config program (for GNU Pth library) | |
200 | ||
201 | case "${host_cpu}-${host_os}" in | |
202 | *solaris*) | |
203 | ||
204 | # On Solaris (at least, for some versions), libc contains stubbed | |
205 | # (non-functional) versions of the pthreads routines, so link-based | |
d79a62db | 206 | # tests will erroneously succeed. (We need to link with -pthreads/-mt/ |
75bfae86 MV |
207 | # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather |
208 | # a function called by this macro, so we could check for that, but | |
209 | # who knows whether they'll stub that too in a future libc.) So, | |
210 | # we'll just look for -pthreads and -lpthread first: | |
211 | ||
d79a62db | 212 | acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" |
75bfae86 MV |
213 | ;; |
214 | esac | |
215 | ||
216 | if test x"$acx_pthread_ok" = xno; then | |
217 | for flag in $acx_pthread_flags; do | |
218 | ||
219 | case $flag in | |
220 | none) | |
221 | AC_MSG_CHECKING([whether pthreads work without any flags]) | |
222 | ;; | |
223 | ||
224 | -*) | |
225 | AC_MSG_CHECKING([whether pthreads work with $flag]) | |
226 | PTHREAD_CFLAGS="$flag" | |
227 | ;; | |
228 | ||
d79a62db NJ |
229 | pthread-config) |
230 | AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) | |
231 | if test x"$acx_pthread_config" = xno; then continue; fi | |
232 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
233 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
234 | ;; | |
75bfae86 MV |
235 | |
236 | *) | |
237 | AC_MSG_CHECKING([for the pthreads library -l$flag]) | |
238 | PTHREAD_LIBS="-l$flag" | |
239 | ;; | |
240 | esac | |
241 | ||
242 | save_LIBS="$LIBS" | |
243 | save_CFLAGS="$CFLAGS" | |
244 | LIBS="$PTHREAD_LIBS $LIBS" | |
245 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
246 | ||
247 | # Check for various functions. We must include pthread.h, | |
248 | # since some functions may be macros. (On the Sequent, we | |
249 | # need a special flag -Kthread to make this header compile.) | |
250 | # We check for pthread_join because it is in -lpthread on IRIX | |
251 | # while pthread_create is in libc. We check for pthread_attr_init | |
252 | # due to DEC craziness with -lpthreads. We check for | |
253 | # pthread_cleanup_push because it is one of the few pthread | |
254 | # functions on Solaris that doesn't have a non-functional libc stub. | |
255 | # We try pthread_create on general principles. | |
256 | AC_TRY_LINK([#include <pthread.h>], | |
257 | [pthread_t th; pthread_join(th, 0); | |
258 | pthread_attr_init(0); pthread_cleanup_push(0, 0); | |
259 | pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], | |
260 | [acx_pthread_ok=yes]) | |
261 | ||
262 | LIBS="$save_LIBS" | |
263 | CFLAGS="$save_CFLAGS" | |
264 | ||
265 | AC_MSG_RESULT($acx_pthread_ok) | |
266 | if test "x$acx_pthread_ok" = xyes; then | |
267 | break; | |
268 | fi | |
269 | ||
270 | PTHREAD_LIBS="" | |
271 | PTHREAD_CFLAGS="" | |
272 | done | |
273 | fi | |
274 | ||
275 | # Various other checks: | |
276 | if test "x$acx_pthread_ok" = xyes; then | |
277 | save_LIBS="$LIBS" | |
278 | LIBS="$PTHREAD_LIBS $LIBS" | |
279 | save_CFLAGS="$CFLAGS" | |
280 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
281 | ||
d79a62db | 282 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
75bfae86 | 283 | AC_MSG_CHECKING([for joinable pthread attribute]) |
d79a62db NJ |
284 | attr_name=unknown |
285 | for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
286 | AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;], | |
287 | [attr_name=$attr; break]) | |
288 | done | |
289 | AC_MSG_RESULT($attr_name) | |
290 | if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then | |
feef98f2 | 291 | AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], $attr_name, |
d79a62db NJ |
292 | [Define to necessary symbol if this constant |
293 | uses a non-standard name on your system.]) | |
75bfae86 MV |
294 | fi |
295 | ||
296 | AC_MSG_CHECKING([if more special flags are required for pthreads]) | |
297 | flag=no | |
298 | case "${host_cpu}-${host_os}" in | |
d79a62db NJ |
299 | *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; |
300 | *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; | |
75bfae86 MV |
301 | esac |
302 | AC_MSG_RESULT(${flag}) | |
303 | if test "x$flag" != xno; then | |
d79a62db | 304 | PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" |
75bfae86 MV |
305 | fi |
306 | ||
307 | LIBS="$save_LIBS" | |
308 | CFLAGS="$save_CFLAGS" | |
309 | ||
d79a62db NJ |
310 | # More AIX lossage: must compile with xlc_r or cc_r |
311 | if test x"$GCC" != xyes; then | |
312 | AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) | |
313 | else | |
314 | PTHREAD_CC=$CC | |
315 | fi | |
75bfae86 MV |
316 | else |
317 | PTHREAD_CC="$CC" | |
318 | fi | |
319 | ||
320 | AC_SUBST(PTHREAD_LIBS) | |
321 | AC_SUBST(PTHREAD_CFLAGS) | |
322 | AC_SUBST(PTHREAD_CC) | |
323 | ||
324 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
325 | if test x"$acx_pthread_ok" = xyes; then | |
feef98f2 | 326 | ifelse([$1],,AC_DEFINE([HAVE_PTHREAD],1,[Define if you have POSIX threads libraries and header files.]),[$1]) |
75bfae86 MV |
327 | : |
328 | else | |
329 | acx_pthread_ok=no | |
330 | $2 | |
331 | fi | |
332 | AC_LANG_RESTORE | |
333 | ])dnl ACX_PTHREAD | |
7a5ab369 | 334 | |
9d19a9d6 LC |
335 | dnl GUILE_GNU_LD_RELRO |
336 | dnl | |
337 | dnl Check whether GNU ld's read-only relocations (the `PT_GNU_RELRO' | |
338 | dnl ELF segment header) are supported. This allows things like | |
339 | dnl statically allocated cells (1) to eventually be remapped read-only | |
340 | dnl by the loader, and (2) to be identified as pointerless by the | |
76e8a758 LC |
341 | dnl garbage collector. Substitute `GNU_LD_FLAGS' with the relevant |
342 | dnl flags. | |
9d19a9d6 LC |
343 | AC_DEFUN([GUILE_GNU_LD_RELRO], [ |
344 | AC_MSG_CHECKING([whether the linker understands `-z relro']) | |
345 | ||
76e8a758 LC |
346 | GNU_LD_FLAGS="-Wl,-z -Wl,relro" |
347 | ||
9d19a9d6 | 348 | save_LDFLAGS="$LDFLAGS" |
76e8a758 | 349 | LDFLAGS="$LDFLAGS $GNU_LD_FLAGS" |
9d19a9d6 LC |
350 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
351 | [AC_MSG_RESULT([yes])], | |
352 | [AC_MSG_RESULT([no]) | |
76e8a758 LC |
353 | GNU_LD_FLAGS=""]) |
354 | LDFLAGS="$save_LDFLAGS" | |
355 | ||
356 | AC_SUBST([GNU_LD_FLAGS]) | |
9d19a9d6 LC |
357 | ]) |
358 | ||
705edb95 LC |
359 | dnl GUILE_THREAD_LOCAL_STORAGE |
360 | dnl | |
361 | dnl Check for compiler thread-local storage (TLS) support. | |
362 | AC_DEFUN([GUILE_THREAD_LOCAL_STORAGE], [ | |
363 | AC_CACHE_CHECK([whether the `__thread' storage class is available], | |
364 | [ac_cv_have_thread_storage_class], | |
96e15df1 LC |
365 | [dnl On some systems, e.g., NetBSD 5.0 with GCC 4.1, `__thread' is |
366 | dnl properly compiled but fails to link due to the lack of TLS | |
0ee42e27 LC |
367 | dnl support in the C library. Thus we try to link, not just |
368 | dnl compile. Unfortunately, this test is not enough, so we | |
369 | dnl explicitly check for known-broken systems. See | |
370 | dnl http://lists.gnu.org/archive/html/guile-devel/2009-10/msg00138.html | |
371 | dnl for details. | |
d7297d39 LC |
372 | dnl |
373 | dnl Known broken systems includes: | |
374 | dnl - x86_64-unknown-netbsd5.0. | |
375 | dnl - sparc-sun-solaris2.8 | |
0ee42e27 | 376 | case "x$enable_shared--$host" in |
d7297d39 | 377 | xyes--*netbsd[0-5].[0-9].|xyes--*solaris2.8) |
0ee42e27 LC |
378 | ac_cv_have_thread_storage_class="no" |
379 | ;; | |
380 | *) | |
381 | AC_LINK_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;], | |
382 | [tls_integer = 123;])], | |
383 | [ac_cv_have_thread_storage_class="yes"], | |
384 | [ac_cv_have_thread_storage_class="no"]) | |
385 | ;; | |
386 | esac]) | |
705edb95 LC |
387 | |
388 | if test "x$ac_cv_have_thread_storage_class" = "xyes"; then | |
389 | SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=1 | |
390 | else | |
391 | SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=0 | |
392 | fi | |
393 | ||
394 | AC_SUBST([SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS]) | |
395 | ]) | |
396 | ||
7a5ab369 LC |
397 | dnl GUILE_READLINE |
398 | dnl | |
399 | dnl Check all the things needed by `guile-readline', the Readline | |
400 | dnl bindings. | |
401 | AC_DEFUN([GUILE_READLINE], [ | |
ec20a3c8 | 402 | for termlib in ncurses curses termcap terminfo termlib pdcurses ; do |
7a5ab369 LC |
403 | AC_CHECK_LIB(${termlib}, [tgoto], |
404 | [READLINE_LIBS="-l${termlib} $READLINE_LIBS"; break]) | |
405 | done | |
406 | ||
407 | AC_LIB_LINKFLAGS([readline]) | |
408 | ||
409 | if test "x$LTLIBREADLINE" = "x"; then | |
410 | AC_MSG_WARN([GNU Readline was not found on your system.]) | |
411 | else | |
412 | rl_save_LIBS="$LIBS" | |
413 | LIBS="$LIBREADLINE $READLINE_LIBS $LIBS" | |
414 | ||
415 | AC_CHECK_FUNCS([siginterrupt rl_clear_signals rl_cleanup_after_signal]) | |
416 | ||
417 | dnl Check for modern readline naming | |
418 | AC_CHECK_FUNCS([rl_filename_completion_function]) | |
ddfb5e2b AW |
419 | AC_CHECK_DECLS([rl_catch_signals, rl_catch_sigwinch], [], [], |
420 | [[#include <stdio.h>] | |
421 | [#include <readline/readline.h>]]) | |
7a5ab369 LC |
422 | |
423 | dnl Check for rl_get_keymap. We only use this for deciding whether to | |
424 | dnl install paren matching on the Guile command line (when using | |
425 | dnl readline for input), so it's completely optional. | |
426 | AC_CHECK_FUNCS([rl_get_keymap]) | |
427 | ||
428 | AC_CACHE_CHECK([for rl_getc_function pointer in readline], | |
429 | ac_cv_var_rl_getc_function, | |
430 | [AC_TRY_LINK([ | |
431 | #include <stdio.h> | |
432 | #include <readline/readline.h>], | |
433 | [printf ("%ld", (long) rl_getc_function)], | |
434 | [ac_cv_var_rl_getc_function=yes], | |
435 | [ac_cv_var_rl_getc_function=no])]) | |
436 | if test "${ac_cv_var_rl_getc_function}" = "yes"; then | |
437 | AC_DEFINE([HAVE_RL_GETC_FUNCTION], 1, | |
438 | [Define if your readline library has the rl_getc_function variable.]) | |
439 | fi | |
440 | ||
441 | if test $ac_cv_var_rl_getc_function = no; then | |
442 | AC_MSG_WARN([*** GNU Readline is too old on your system.]) | |
443 | AC_MSG_WARN([*** You need readline version 2.1 or later.]) | |
444 | LTLIBREADLINE="" | |
445 | LIBREADLINE="" | |
446 | fi | |
447 | ||
448 | LIBS="$rl_save_LIBS" | |
449 | ||
023cd5ba | 450 | READLINE_LIBS="$LTLIBREADLINE $READLINE_LIBS" |
7a5ab369 LC |
451 | fi |
452 | ||
453 | AM_CONDITIONAL([HAVE_READLINE], [test "x$LTLIBREADLINE" != "x"]) | |
454 | ||
455 | AC_CHECK_FUNCS([strdup]) | |
456 | ||
457 | AC_SUBST([READLINE_LIBS]) | |
458 | ||
459 | . $srcdir/guile-readline/LIBGUILEREADLINE-VERSION | |
460 | AC_SUBST(LIBGUILEREADLINE_MAJOR) | |
461 | AC_SUBST(LIBGUILEREADLINE_INTERFACE_CURRENT) | |
462 | AC_SUBST(LIBGUILEREADLINE_INTERFACE_REVISION) | |
463 | AC_SUBST(LIBGUILEREADLINE_INTERFACE_AGE) | |
464 | AC_SUBST(LIBGUILEREADLINE_INTERFACE) | |
465 | ]) | |
39f7ae31 TTN |
466 | |
467 | dnl Declare file $1 to be a script that needs configuring, | |
468 | dnl and arrange to make it executable in the process. | |
469 | AC_DEFUN([GUILE_CONFIG_SCRIPT],[AC_CONFIG_FILES([$1],[chmod +x $1])]) |