1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(src/main/main.c)
5 AC_CONFIG_AUX_DIR(config)
11 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Package version])
12 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Package version])
13 AC_CONFIG_HEADERS(config.h)
15 AC_CHECK_PROG(ACLOCAL,[aclocal],[aclocal],[config/missing aclocal])
16 AC_CHECK_PROG(AUTOCONF,[autoconf],[autoconf],[config/missing autoconf])
17 AC_CHECK_PROG(AUTOHEADER,[autoheader],[autoheader],[config/missing autoheader])
21 for make in gnumake gmake make false; do
22 if test "x$MAKE" = x; then
23 AC_PATH_PROGS(MAKE, "$make")
29 # Cleanup if we are configuring with a previous build in the tree
30 if test -e Makefile.config; then
31 AC_MSG_CHECKING([for previous build to clean])
32 "$MAKE" -C "$builddir/src" cleanall >/dev/null 2>/dev/null
36 dnl ===================================================================
37 dnl Load feature configuration file and start logging features.
38 dnl ===================================================================
40 features="features.conf"
41 AC_CHECK_FILE("$srcdir/$features", [ . $srcdir/$features ])
42 AC_CHECK_FILE("$builddir/$features", [ . $builddir/$features ])
43 echo "Feature summary:" > features.log
45 dnl ===================================================================
46 dnl Checks for programs.
47 dnl ===================================================================
51 AC_PATH_PROGS(AWK, "$AWK")
55 AC_PATH_PROGS(CG_COMMIT_ID, "cg-commit-id")
56 AC_PATH_PROGS(SPARSE, "sparse")
63 if test "x$CONFIG_DOC" != xno; then
64 AC_PATH_PROGS(ASCIIDOC, "asciidoc")
65 if test "x$ASCIIDOC" != "x"; then
66 EL_CONFIG(CONFIG_ASCIIDOC, [AsciiDoc])
67 EL_CONFIG(MANUAL_ASCIIDOC, [HTML (one file)])
68 EL_CONFIG(MAN_ASCIIDOC, [HTML])
70 echo > config.asciidoc-unsafe.txt
71 if "$ASCIIDOC" --unsafe config.asciidoc-unsafe.txt >&/dev/null; then
72 ASCIIDOC_FLAGS=--unsafe
74 rm config.asciidoc-unsafe.*
77 AC_PATH_PROGS(XMLTO, "xmlto")
78 if test "x$XMLTO" != "x"; then
79 EL_CONFIG(CONFIG_XMLTO, [XmlTo])
80 EL_CONFIG(MANUAL_XMLTO, [HTML (multiple files)])
81 EL_CONFIG(MAN_XMLTO, [man (groff)])
84 AC_PATH_PROGS(JW, "jw")
85 if test "x$JW" != "x"; then
86 EL_CONFIG(CONFIG_JW, [JadeWrapper])
87 EL_CONFIG(MANUAL_JW, [PDF])
90 AC_PATH_PROGS(POD2HTML, "pod2html")
91 if test "x$POD2HTML" != "x"; then
92 EL_CONFIG(CONFIG_POD2HTML, [Pod2HTML])
96 AC_SUBST(ASCIIDOC_FLAGS)
97 AC_SUBST(CONFIG_ASCIIDOC)
98 AC_SUBST(CONFIG_POD2HTML)
99 AC_SUBST(CONFIG_XMLTO)
102 EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation])
104 if test "$CONFIG_ASCIIDOC" = yes &&
105 test "$CONFIG_XMLTO" = yes &&
106 test "$CONFIG_JW" = yes; then
107 EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats])
110 if test "$CONFIG_ASCIIDOC" = yes &&
111 test "$CONFIG_XMLTO" = yes; then
112 EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats])
115 AC_SUBST(CONFIG_ASCIIDOC)
116 AC_SUBST(CONFIG_POD2HTML)
117 AC_SUBST(CONFIG_XMLTO)
120 dnl gcc specific options (to be continued at the bottom of configure)
121 if test "x$ac_cv_prog_gcc" = "xyes"; then
122 dnl We want to see all warnings and live with none.
123 dnl We can't set up -Werror here as there may be some warnings in test
124 dnl suite of configure, and we don't want to fail them.
125 CFLAGS="$CFLAGS -Wall"
128 dnl ===================================================================
129 dnl Checks for special OSes.
130 dnl ===================================================================
132 dnl EL_CHECK_COMPILER_MACRO(define, name, flagname)
133 AC_DEFUN([EL_CHECK_COMPILER_MACROS],
135 AC_MSG_CHECKING([for $2])
138 AC_TRY_COMPILE(, [#ifndef $flag
140 #endif ], $1=yes, $1=no)
141 if test "[$]$1" = yes; then
142 EL_CONFIG([$1], [$2])
150 EL_CHECK_COMPILER_MACROS(CONFIG_BEOS, [BEOS], [__BEOS__])
151 AC_SUBST(CONFIG_BEOS)
153 EL_CHECK_COMPILER_MACROS(CONFIG_RISCOS, [RISCOS], [__riscos__])
154 AC_SUBST(CONFIG_RISCOS)
156 EL_CHECK_COMPILER_MACROS(CONFIG_WIN32, [WIN32], [_WIN32 __WIN32__])
157 AC_SUBST(CONFIG_WIN32)
159 EL_CHECK_COMPILER_MACROS(CONFIG_OS2, [EMX], [__EMX__])
161 test "$CONFIG_OS2" = yes && LDFLAGS=`echo "$LDFLAGS" | sed "s/-Zexe//g"`
163 AC_MSG_CHECKING([for UNIX])
164 dnl FIXME: some depend kind of mechanism
165 if test "$CONFIG_BEOS" = no && \
166 test "$CONFIG_RISCOS" = no && \
167 test "$CONFIG_WIN32" = no && \
168 test "$CONFIG_OS2" = no; then
169 EL_CONFIG(CONFIG_UNIX, [UNIX])
173 AC_MSG_RESULT($CONFIG_UNIX)
174 AC_SUBST(CONFIG_UNIX)
176 dnl ===================================================================
177 dnl Checks for header files.
178 dnl ===================================================================
185 AC_CHECK_HEADERS(fcntl.h limits.h time.h unistd.h)
186 AC_CHECK_HEADERS(sigaction.h)
187 AC_CHECK_HEADERS(arpa/inet.h)
188 AC_CHECK_HEADERS(netinet/in_systm.h netinet/in_system.h netinet/ip.h)
189 AC_CHECK_HEADERS(net/if.h netdb.h netinet/in.h netinet/in6_var.h)
190 AC_CHECK_HEADERS(ifaddrs.h)
191 AC_CHECK_HEADERS(sys/cygwin.h io.h)
192 AC_CHECK_HEADERS(sys/fmutex.h)
193 AC_CHECK_HEADERS(sys/ioctl.h sys/sockio.h)
194 AC_CHECK_HEADERS(sys/resource.h)
195 AC_CHECK_HEADERS(sys/select.h)
196 AC_CHECK_HEADERS(sys/signal.h)
197 AC_CHECK_HEADERS(sys/socket.h)
198 AC_CHECK_HEADERS(sys/time.h)
199 AC_CHECK_HEADERS(sys/utsname.h)
200 AC_CHECK_HEADERS(stdint.h inttypes.h)
201 AC_CHECK_HEADERS(locale.h pwd.h)
202 AC_CHECK_HEADERS(termios.h)
205 AC_CHECK_HEADERS(sys/un.h,
206 [CONFIG_INTERLINK=yes
207 EL_CONFIG([CONFIG_INTERLINK], [interlinking])],
208 [CONFIG_INTERLINK=no])
209 AC_SUBST(CONFIG_INTERLINK)
211 dnl ===================================================================
212 dnl Checks for typedefs, structures, and compiler characteristics.
213 dnl ===================================================================
218 EL_CHECK_CODE(typeof, HAVE_TYPEOF, [], [int a; typeof(a) b;])
223 EL_CHECK_TYPE(ssize_t, int)
224 EL_CHECK_SYS_TYPE(long long, HAVE_LONG_LONG, [])
225 EL_CHECK_INT_TYPE(int32_t, HAVE_INT32_T)
226 EL_CHECK_INT_TYPE(uint32_t, HAVE_UINT32_T)
227 EL_CHECK_INT_TYPE(uint16_t, HAVE_UINT16_T)
229 AC_CHECK_SIZEOF(char, 1)
230 AC_CHECK_SIZEOF(short, 2)
231 AC_CHECK_SIZEOF(int, 4)
232 AC_CHECK_SIZEOF(long, 4)
233 test "x$HAVE_LONG_LONG" = xyes && AC_CHECK_SIZEOF(long long, 8)
235 dnl Check for variadic macros
236 EL_CHECK_CODE([variadic macros], HAVE_VARIADIC_MACROS,
238 #define a(b,c...) printf(b,##c)],
239 [a("foo");a("%s","bar");a("%s%s","baz","quux");])
241 dnl Check for -rdynamic
242 dnl FIXME: This check doesn't work. Something to do with the compiler
243 dnl happily ignoring it and stderr not being checked for error messages.
244 AC_MSG_CHECKING([for -rdynamic])
246 LDFLAGS="$LDFLAGS -rdynamic"
247 AC_TRY_LINK([], [], have_rdynamic=yes, have_rdynamic=no)
248 test "$have_rdynamic" = no && LDFLAGS="$LDFLAGS_X"
249 AC_MSG_RESULT($have_rdynamic)
251 dnl ===================================================================
252 dnl Check for POSIX <regex.h>
253 dnl ===================================================================
255 EL_CHECK_SYS_TYPE(regex_t, HAVE_REGEX_H, [#include <regex.h>])
257 dnl ===================================================================
258 dnl Checks for library functions.
259 dnl ===================================================================
261 AC_PROG_GCC_TRADITIONAL
265 AC_CHECK_FUNCS(cfmakeraw gethostbyaddr herror strerror)
266 AC_CHECK_FUNCS(popen uname access chmod alarm timegm mremap)
267 AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr strstr strchr strrchr)
268 AC_CHECK_FUNCS(memmove bcopy stpcpy strdup index isdigit mempcpy memrchr)
269 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf)
270 AC_CHECK_FUNCS(getifaddrs getpwnam inet_pton inet_ntop)
271 AC_CHECK_FUNCS(fflush fsync fseeko ftello sigaction)
272 AC_CHECK_FUNCS(gettimeofday clock_gettime)
274 AC_HAVE_FUNCS(cygwin_conv_to_full_win32_path)
276 AC_CHECK_FUNCS(setenv putenv, HAVE_SETENV_OR_PUTENV=yes)
277 AC_CHECK_FUNCS(getuid, HAVE_GETUID=yes)
278 AC_CHECK_FUNCS(geteuid, HAVE_GETEUID=yes)
280 dnl These aren't probably needed now, as they are commented in links.h.
281 dnl I've no idea about their historical background, but I keep them here
282 dnl just in the case they will help later. --pasky
283 AC_CHECK_FUNCS(getpid, HAVE_GETPID=yes)
284 AC_CHECK_FUNCS(setpgid getpgid setpgrp getpgrp)
285 AC_CHECK_FUNCS(raise, HAVE_RAISE=yes)
286 AC_CHECK_FUNCS(kill, HAVE_KILL=yes)
288 if test x"$HAVE_RAISE" = x; then
289 if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then
290 AC_ERROR([Unable to emulate raise()])
294 AC_CACHE_CHECK([for __va_copy],el_cv_HAVE_VA_COPY,[
295 AC_TRY_LINK([#include <stdarg.h>
296 va_list ap1,ap2;], [__va_copy(ap1,ap2);],
297 el_cv_HAVE_VA_COPY=yes,el_cv_HAVE_VA_COPY=no)])
298 if test x"$el_cv_HAVE_VA_COPY" = x"yes"; then
299 EL_DEFINE(HAVE_VA_COPY, __va_copy)
302 AC_CACHE_CHECK([for sysconf(_SC_PAGE_SIZE)],el_cv_HAVE_SC_PAGE_SIZE,[
303 AC_TRY_LINK([#include <unistd.h>
304 ], [int page_size = sysconf(_SC_PAGE_SIZE);],
305 el_cv_HAVE_SC_PAGE_SIZE=yes,el_cv_HAVE_SC_PAGE_SIZE=no)])
306 if test x"$el_cv_HAVE_SC_PAGE_SIZE" = x"yes"; then
307 EL_DEFINE(HAVE_SC_PAGE_SIZE, _SC_PAGE_SIZE)
310 AC_CACHE_CHECK([for C99 vsnprintf],el_cv_HAVE_C99_VSNPRINTF,[
319 int bar(char *buf, const char *format, va_list ap)
321 return vsnprintf(buf, 0, format, ap);
324 void foo(const char *format, ...) {
328 va_start(ap, format);
329 len = bar(buf, format, ap);
331 if ((len != 6) && (len != 7)) exit(1); /* \n -> \r\n */
333 va_start(ap, format);
334 len = bar(buf, format, ap);
336 if ((len != 6) && (len != 7)) exit(1);
338 if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
342 main() { foo("hello\n"); }
344 el_cv_HAVE_C99_VSNPRINTF=yes,el_cv_HAVE_C99_VSNPRINTF=no,el_cv_HAVE_C99_VSNPRINTF=cross)])
345 if test x"$el_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
346 EL_DEFINE(HAVE_C99_VSNPRINTF, [C99 compliant vsnprintf()])
349 AC_CHECK_LIB(dl, dlopen) # OpenSSL and Lua frequently needs it
351 dnl ===================================================================
352 dnl Checks for libraries.
353 dnl ===================================================================
355 dnl Replace `main' with a function in -lsocket:
356 AC_CHECK_FUNC(socket, cf_result=yes, cf_result=no)
357 if test "$cf_result" = no; then
358 AC_CHECK_LIB(socket, socket)
361 AC_CHECK_FUNC(setsockopt, cf_result=yes, cf_result=no)
362 if test "$cf_result" = no; then
363 AC_CHECK_LIB(socket, setsockopt)
366 AC_CHECK_FUNC(gethostbyname, cf_result=yes, cf_result=no)
367 if test "$cf_result" = no; then
368 AC_CHECK_LIB(socket, gethostbyname, cf_result=yes, cf_result=no)
369 if test "$cf_result" = no; then
370 AC_CHECK_LIB(nsl, gethostbyname)
372 test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
376 dnl ===================================================================
377 dnl Checks for packaging specific options.
378 dnl ===================================================================
380 AC_ARG_WITH(xterm, [ --with-xterm how to invoke the X terminal emulator],
381 [ if test "$withval" != no && test "$withval" != yes; then
382 AC_DEFINE_UNQUOTED(XTERM, "$withval", [How to invoke XTerm])
385 dnl ===================================================================
386 dnl Checks for a libraries, optional even if installed.
387 dnl ===================================================================
389 dnl EL_CHECK_OPTIONAL_LIBRARY(define, name, header, lib, function)
390 AC_DEFUN([EL_CHECK_OPTIONAL_LIBRARY],
392 AC_MSG_CHECKING([for $2 support])
394 if test "[$]$1" != no; then
397 if test -n "$withval" && test -d "$withval"; then
398 CFLAGS="$CFLAGS -I$withval/include";
399 CPPFLAGS="$CPPFLAGS -I$withval/include";
400 LDFLAGS="$LDFLAGS -L$withval/lib";
403 AC_CHECK_HEADERS([$3], [$1=yes], [$1=no; break;])
404 if test "[$]$1" = yes; then
405 AC_CHECK_LIB([$4], [$5], [$1=yes], [$1=no])
408 if test "[$]$1" = yes; then
409 EL_CONFIG([$1], [$2])
412 if test -n "[$]WITHVAL_$1" &&
413 test "[$]WITHVAL_$1" != xno; then
414 AC_MSG_ERROR([$2 not found])
419 AC_MSG_RESULT(disabled)
423 dnl EL_CONFIG_OPTIONAL_LIBRARY(define, name, header, lib, function, confhelp)
424 AC_DEFUN([EL_CONFIG_OPTIONAL_LIBRARY],
429 AC_ARG_WITH([$2], [$6], [WITHVAL_$1="[$]withval"])
430 if test "x[$]WITHVAL_$1" = xno; then $1=no; fi
432 EL_CHECK_OPTIONAL_LIBRARY([$1], [$2], [$3], [$4], [$5])
434 EL_LOG_CONFIG([$1], [$2], [])
437 EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GPM, gpm, gpm.h, gpm, Gpm_Open,
438 [ --without-gpm disable gpm (mouse) support])
440 EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GZIP, zlib, zlib.h, z, gzdopen,
441 [ --without-zlib disable zlib support])
443 EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_BZIP2, bzlib, bzlib.h, bz2, BZ2_bzReadOpen,
444 [ --without-bzlib disable bzlib support])
446 EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN, idn, idna.h, idn, stringprep_check_version,
447 [ --without-idn disable international domain names support])
449 dnl ===================================================================
450 dnl Bookmark and XBEL support
451 dnl ===================================================================
455 EL_ARG_ENABLE(CONFIG_BOOKMARKS, bookmarks, [Bookmarks],
456 [ --disable-bookmarks disable bookmark support])
458 # Check whether --enable-xbel or --disable-xbel was given.
459 if test "x${enable_xbel}" != xno; then
460 AC_CHECK_HEADERS(expat.h, HAVE_LIBEXPAT=yes, HAVE_LIBEXPAT=no)
462 if test "$HAVE_LIBEXPAT" = yes; then
463 AC_CHECK_LIB(expat, XML_ParserCreate, HAVE_LIBEXPAT=yes, HAVE_LIBEXPAT=no)
464 if test "$HAVE_LIBEXPAT" = yes; then
471 EL_ARG_DEPEND(CONFIG_XBEL_BOOKMARKS, xbel, [CONFIG_BOOKMARKS:yes HAVE_LIBEXPAT:yes],
473 [ --disable-xbel disable XBEL bookmark support (requires expat)])
475 if test "$CONFIG_XBEL_BOOKMARKS" != yes; then
479 dnl ===================================================================
480 dnl Checks for BSD sysmouse
481 dnl ===================================================================
483 HAVE_SYSMOUSE_HEADER="no"
485 # Either of these header files provides the (same) sysmouse interface
486 AC_CHECK_HEADERS(sys/consio.h machine/console.h, [HAVE_SYSMOUSE_HEADER="yes"])
488 dnl ===================================================================
490 dnl ===================================================================
492 if test "$CONFIG_OS2" = yes; then
496 dnl ===================================================================
498 dnl ===================================================================
500 if test "$CONFIG_WIN32" = yes; then
504 dnl ===================================================================
505 dnl Check for SpiderMonkey, optional even if installed.
506 dnl ===================================================================
508 AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support],
509 [if test "$withval" = no; then disable_spidermonkey=yes; fi])
510 AC_MSG_CHECKING([for SpiderMonkey])
515 if test -z "$disable_spidermonkey"; then
516 if test ! -d "$withval"; then
519 for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
520 for spidermonkeyinclude in "/include" "/include/js" "/include/smjs"; do
521 for spidermonkeylib in js smjs; do
522 if test "$cf_result" = no; then
523 SPIDERMONKEY_LIBS="-l$spidermonkeylib"
525 if test ! -z "$spidermonkeydir"; then
526 SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib $SPIDERMONKEY_LIBS"
527 SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
530 LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
531 CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
532 CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
534 AC_TRY_LINK([#define XP_UNIX
536 [JS_GetImplementationVersion()],
537 cf_result=yes, cf_result=no)
544 AC_MSG_RESULT($cf_result)
546 if test "$cf_result" != yes; then
549 EL_CONFIG(CONFIG_SPIDERMONKEY, [SpiderMonkey])
552 AC_SUBST(SPIDERMONKEY_LIBS)
553 AC_SUBST(SPIDERMONKEY_CFLAGS)
556 AC_SUBST(CONFIG_SPIDERMONKEY)
558 EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_SPIDERMONKEY], [ECMAScript (JavaScript)])
561 dnl ===================================================================
562 dnl Check for Guile, optional even if installed.
563 dnl ===================================================================
567 AC_ARG_WITH(guile, [ --with-guile enable Guile support],
568 [ if test "x$withval" != xno; then enable_guile=yes; fi ])
570 # The following is probably bad, ugly and so on. Stolen from Guile's (1.4)
571 # GUILE_FLAGS but I really don't want to require people to have Guile in order
572 # to compile CVS. Also, the macro seems to be really stupid regarding searching
573 # for Guile in $PATH etc. --pasky
575 AC_MSG_CHECKING([for Guile])
577 if test "$enable_guile" = "yes"; then
579 ## Based on the GUILE_FLAGS macro.
581 if test -d "$withval"; then
582 GUILE_PATH="$withval:$PATH"
587 AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $GUILE_PATH)
589 ## First, let's just see if we can find Guile at all.
590 if test "$GUILE_CONFIG" != no; then
593 GUILE_LIBS="`guile-config link`"
594 GUILE_CFLAGS="`guile-config compile`"
595 LIBS="$GUILE_LIBS $LIBS"
596 CPPFLAGS="$CPPFLAGS $GUILE_CFLAGS"
597 EL_CONFIG(CONFIG_GUILE, [Guile])
598 AC_SUBST(GUILE_CFLAGS)
600 ***********************************************************************
601 The Guile support is incomplete and not so well integrated to ELinks
602 yet. That means, ie., that you have no Guile console and there might
603 not be all the necessary hooks. Also, the Guile interface is not too
604 well tested (success stories heartily welcomed!). See
605 src/scripting/guile/README for further details and hints.
606 ***********************************************************************
609 if test -n "$withval" && test "x$withval" != xno; then
610 AC_MSG_ERROR([Guile not found])
612 AC_MSG_WARN([Guile support disabled])
619 dnl ===================================================================
621 dnl ===================================================================
624 AC_ARG_WITH(perl, [ --with-perl enable Perl support],
626 if test "$withval" = yes; then
627 # FIXME: If withval is a valid directory append it to PATH
628 # so that you can specify one of several perl installations.
634 AC_MSG_CHECKING([for Perl])
640 if test "$enable_perl" = "yes"; then
641 PERL_LIBS="`perl -MExtUtils::Embed -e ldopts`"
642 PERL_CFLAGS="`perl -MExtUtils::Embed -e ccopts`"
643 LIBS="$PERL_LIBS $LIBS"
644 CFLAGS="$PERL_CFLAGS $CFLAGS"
645 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
651 [PerlInterpreter *my_perl = perl_alloc();],
652 cf_result=yes, cf_result=no)
655 if test "$cf_result" != "yes"; then
658 EL_CONFIG(CONFIG_PERL, [Perl])
662 AC_SUBST(PERL_CFLAGS)
665 if test "$cf_result"; then AC_MSG_RESULT($cf_result); fi
666 dnl ===================================================================
668 dnl ===================================================================
671 AC_ARG_WITH(python, [ --with-python enable Python support],
673 if test "$withval" = yes; then
674 # FIXME: If withval is a valid directory append it to PATH
675 # so that you can specify one of several Python installations.
679 ***********************************************************************
680 The Python support is incomplete and not so well integrated to ELinks
681 yet. That means, ie., that you have no Python console and there might
682 not be all the necessary hooks. Also, the Python interface is not too
683 well tested (success stories heartily welcomed!).
684 ***********************************************************************
689 AC_MSG_CHECKING([for Python])
695 if test "$enable_python" = "yes"; then
696 PYTHON_LIBS="-lpython"
697 PYTHON_CFLAGS="-I`python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()' 2> /dev/null`"
698 LIBS="$PYTHON_LIBS $LIBS"
699 CFLAGS="$PYTHON_CFLAGS $CFLAGS"
700 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
705 cf_result=yes, cf_result=no)
708 if test "$cf_result" != "yes"; then
711 EL_CONFIG(CONFIG_PYTHON, [Python])
714 AC_SUBST(PYTHON_LIBS)
715 AC_SUBST(PYTHON_CFLAGS)
718 if test "$cf_result"; then AC_MSG_RESULT($cf_result); fi
721 dnl ===================================================================
722 dnl Check for Lua, optional even if installed.
723 dnl ===================================================================
725 dnl Do this the long way, as FreeBSD reportedly needs -L<dir> for
726 dnl anything other than /usr/lib, and Lua is very often in /usr/local/lib.
728 AC_ARG_WITH(lua, [ --without-lua disable Lua support],
729 [if test "$withval" = no; then disable_lua=yes; fi])
730 AC_MSG_CHECKING([for Lua])
735 if test -z "$disable_lua"; then
736 if test ! -d "$withval"; then
739 for luadir in "$withval" "" /usr /usr/local; do
740 for suffix in "" 50 51; do
741 if test "$cf_result" = no; then
742 LUA_LIBS="-llua$suffix -llualib$suffix -lm"
744 if test ! -z "$luadir"; then
745 LUA_LIBS="-L$luadir/lib $LUA_LIBS"
746 LUA_CFLAGS="-I$luadir/include -I$luadir/include/lua$suffix"
749 LIBS="$LUA_LIBS $LIBS_X"
750 CFLAGS="$CFLAGS_X $LUA_CFLAGS"
751 CPPFLAGS="$CPPFLAGS_X $LUA_CFLAGS"
753 # Check that it is a compatible Lua version
754 AC_TRY_LINK([ #include <lua.h>
755 #include <lualib.h>],
756 [ lua_State *L = lua_open();
761 lua_pushboolean(L, 1);
763 cf_result=yes, cf_result=no)
769 AC_MSG_RESULT($cf_result)
771 if test "$cf_result" != yes; then
774 EL_CONFIG(CONFIG_LUA, [Lua])
775 AC_CHECK_HEADERS(lauxlib.h)
783 dnl ===================================================================
784 dnl Check for Ruby, optional even if installed.
785 dnl ===================================================================
789 dnl ===================================================================
790 dnl Optional Spidermonkey-based ECMAScript browser scripting
791 dnl ===================================================================
793 AC_ARG_ENABLE(sm-scripting,
794 [ --disable-sm-scripting ECMAScript browser scripting (requires Spidermonkey)],
795 [if test "$enableval" != no; then enableval="yes"; fi
796 CONFIG_SM_SCRIPTING="$enableval";])
798 if test "x$CONFIG_SPIDERMONKEY" = xyes &&
799 test "x$CONFIG_SM_SCRIPTING" = xyes; then
800 EL_CONFIG(CONFIG_SM_SCRIPTING, [SpiderMonkey])
802 CONFIG_SM_SCRIPTING=no
805 dnl ===================================================================
806 dnl Setup global scripting
807 dnl ===================================================================
809 EL_CONFIG_DEPENDS(CONFIG_SCRIPTING, [CONFIG_GUILE CONFIG_LUA CONFIG_PERL CONFIG_PYTHON CONFIG_RUBY CONFIG_SM_SCRIPTING], [Browser scripting])
810 AC_SUBST(CONFIG_GUILE)
812 AC_SUBST(CONFIG_PERL)
813 AC_SUBST(CONFIG_PYTHON)
814 AC_SUBST(CONFIG_RUBY)
815 AC_SUBST(CONFIG_SM_SCRIPTING)
816 AC_SUBST(CONFIG_SCRIPTING)
819 dnl ===================================================================
820 dnl Check for SSL support.
821 dnl ===================================================================
823 dnl We by default use OpenSSL, and we always prefer it. However, when GNUTLS
824 dnl is enabled, we won't try to use OpenSSL anymore.
826 dnl For wiping SSL hooks..
833 AC_ARG_WITH(gnutls, [ --without-gnutls disable GNUTLS SSL support],
834 [if test "$with_gnutls" = no; then disable_gnutls=yes; fi])
835 AC_ARG_WITH(gnutls, [ --with-gnutls[=DIR] enable GNUTLS SSL support],
836 [if test "$with_gnutls" != no; then enable_gnutls=yes; fi])
837 gnutls_withval="$withval"
839 if test "$enable_gnutls" = yes; then
843 AC_ARG_WITH(openssl, [ --without-openssl disable OpenSSL support],
844 [if test "$with_openssl" = no; then disable_openssl=yes; fi])
845 AC_ARG_WITH(openssl, [ --with-openssl[=DIR] enable OpenSSL support (default)])
846 openssl_withval="$withval"
850 AC_MSG_CHECKING([for OpenSSL])
855 if test "$disable_openssl" = yes; then
858 for ssldir in "$openssl_withval" "" /usr /usr/local/openssl \
859 /usr/lib/openssl /usr/local/ssl \
860 /usr/local/www /usr/lib/ssl /usr/local \
861 /usr/pkg /opt /opt/openssl; do
862 if test "$cf_result" = no; then
863 if test -d "$ssldir"; then
864 OPENSSL_CFLAGS="-I$ssldir/include"
865 LIBS="-L$ssldir/lib -lssl -lcrypto $LIBS_X"
866 CFLAGS="$CFLAGS_X $OPENSSL_CFLAGS"
867 CPPFLAGS="$CPPFLAGS_X $OPENSSL_CFLAGS"
868 # # FIXME: This created serious portability problems. --pasky
869 # if test "$CC" == "gcc"; then
870 # # I'm not sure about compatibility here. --pasky
871 # LIBS="$LIBS -R$ssldir/lib"
874 LIBS="-lssl -lcrypto $LIBS_X"
876 AC_TRY_LINK([#include <openssl/ssl.h>],
877 [OpenSSL_add_all_algorithms()],
878 cf_result=yes, cf_result=no)
879 if test "$cf_result" != yes; then
880 AC_TRY_LINK([#include <openssl/ssl.h>],
881 [SSLeay_add_ssl_algorithms()],
882 cf_result=yes, cf_result=no)
887 if test "$cf_result" != yes; then
888 if test -n "$openssl_withval" && test "x$openssl_withval" != xno; then
889 AC_MSG_ERROR([OpenSSL not found])
893 EL_CONFIG(CONFIG_OPENSSL, [OpenSSL])
896 AC_SUBST(OPENSSL_CFLAGS)
900 AC_MSG_RESULT($cf_result)
903 dnl We can't have AC_MSG_CHECKING here, because AC_PATH_PROG prints its own and
904 dnl it looks ugly then.
906 if test "$cf_result" = yes; then
913 if test -z "$disable_gnutls"; then
914 # Sure, we maybe _could_ use their macro, but how to ensure
915 # that the ./configure script won't fail if the macro won't be
916 # found..? :( --pasky
918 GNUTLS_PATH="$PATH:/usr/local/gnutls:/opt:/opt/gnutls"
920 if test -d "$gnutls_withval"; then
921 GNUTLS_PATH="$gnutls_withval:$GNUTLS_PATH"
924 AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no, $GNUTLS_PATH)
926 if test "$LIBGNUTLS_CONFIG" = "no" ; then
929 GNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG --cflags`
930 GNUTLS_LIBS=`$LIBGNUTLS_CONFIG --libs`
932 LIBS="$GNUTLS_LIBS $LIBS_X"
933 CFLAGS="$CFLAGS_X $GNUTLS_CFLAGS"
934 CPPFLAGS="$CPPFLAGS_X $GNUTLS_CFLAGS"
936 # Verify if it's really usable. gnutls_session was
937 # renamed to gnutls_session_t before GNU TLS 1.2.0
938 # (on 2004-06-13); ELinks now requires this.
939 AC_TRY_LINK([#include <gnutls/gnutls.h>],
940 [gnutls_session_t dummy;
941 gnutls_check_version(NULL)],
942 cf_result=yes, cf_result=no)
945 if test "$cf_result" = yes; then
946 EL_CONFIG(CONFIG_GNUTLS, [GNUTLS])
949 AC_SUBST(GNUTLS_CFLAGS)
951 # Verify if the MD5 compatibility layer is usable.
952 CONFIG_GNUTLS_OPENSSL_COMPAT=yes
953 EL_CHECK_OPTIONAL_LIBRARY(CONFIG_GNUTLS_OPENSSL_COMPAT,
954 [GNU TLS OpenSSL compatibility],
955 gnutls/openssl.h, gnutls-openssl,
958 if test -n "$gnutls_withval" && test "x$gnutls_withval" != xno; then
959 AC_MSG_ERROR([GNUTLS (1.2 or later) not found. ELinks no longer supports GNUTLS 1.1.])
966 AC_MSG_CHECKING([for GNU TLS (1.2 or later)])
967 AC_MSG_RESULT($cf_result)
971 EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS], [SSL])
972 AC_SUBST(CONFIG_GNUTLS_OPENSSL_COMPAT)
973 AC_SUBST(CONFIG_OPENSSL)
974 AC_SUBST(CONFIG_GNUTLS)
978 AC_MSG_CHECKING([whether to be or not to be])
979 AC_MSG_RESULT([needs to be determined experimentally])
981 dnl ===================================================================
982 dnl Check for IPv6 support and related functions.
983 dnl ===================================================================
985 EL_CHECK_NET_TYPE(struct sockaddr_storage, HAVE_SA_STORAGE, [])
986 EL_CHECK_NET_TYPE(struct sockaddr_in6, HAVE_SA_IN6, [#include <netinet/in.h>])
987 EL_CHECK_NET_TYPE(struct addrinfo, HAVE_ADDRINFO, [#include <netdb.h>])
989 AC_CHECK_FUNC(getaddrinfo, HAVE_GETADDRINFO=yes, HAVE_GETADDRINFO=no)
990 if test "$HAVE_GETADDRINFO" != yes; then
991 AC_CHECK_LIB(inet6, getaddrinfo, HAVE_GETADDRINFO=yes, HAVE_GETADDRINFO=no)
992 if test "$HAVE_GETADDRINFO" = yes; then
998 dnl ===================================================================
999 dnl Checking for X11 (window title restoring).
1000 dnl ===================================================================
1003 if test x"$no_x" != xyes; then
1004 if test -n "$x_includes"; then
1005 X_CFLAGS="-I$x_includes"
1006 CPPFLAGS="$CPPFLAGS -I$x_includes"
1008 if test -n "$x_libraries"; then
1009 LDFLAGS="$LDFLAGS -L$x_libraries"
1012 EL_DEFINE(HAVE_X11, [X11 for restoring window titles])
1017 dnl ===================================================================
1018 dnl Backtraces displaying support.
1019 dnl ===================================================================
1021 AC_CHECK_HEADERS(execinfo.h, HAVE_EXECINFO=yes, HAVE_EXECINFO=no)
1022 # possible checks for other system-specific means go here
1025 dnl ===================================================================
1026 dnl SMB protocol support.
1027 dnl ===================================================================
1029 AC_CHECK_PROG(HAVE_SMBCLIENT, smbclient, yes, no)
1032 dnl ===================================================================
1033 dnl Gettext grey zone. Beware.
1034 dnl ===================================================================
1036 ALL_LINGUAS="be bg ca cs da de el es et fi fr gl hr hu id is it lt nl nb pl pt pt_BR ro ru sk sr sv tr uk"
1040 dnl AC_MSG_CHECKING([how many characters your English alphabet has])
1041 dnl # f33r d4 l33t... I hope it's portable. :)
1042 dnl cf_result=$((48#z - 48#a + 1));
1043 dnl AC_MSG_RESULT($cf_result)
1046 dnl ===================================================================
1047 dnl Compile-time features control
1048 dnl ===================================================================
1050 EL_ARG_ENABLE(CONFIG_COOKIES, cookies, [Cookies],
1051 [ --disable-cookies disable cookie support])
1053 EL_ARG_ENABLE(CONFIG_FORMHIST, formhist, [Form history],
1054 [ --disable-formhist disable form history support])
1056 EL_ARG_ENABLE(CONFIG_GLOBHIST, globhist, [Global history],
1057 [ --disable-globhist disable global history support])
1060 EL_ARG_ENABLE(CONFIG_MAILCAP, mailcap, [Mailcap],
1061 [ --disable-mailcap disable mailcap support])
1063 EL_ARG_ENABLE(CONFIG_MIMETYPES, mimetypes, [Mimetypes files],
1064 [ --disable-mimetypes disable mimetypes files support])
1067 EL_ARG_DEPEND(CONFIG_IPV6, ipv6,
1068 [HAVE_SA_STORAGE:yes HAVE_SA_IN6:yes HAVE_ADDRINFO:yes HAVE_GETADDRINFO:yes],
1070 [ --disable-ipv6 disable IPv6 support])
1072 EL_ARG_ENABLE(CONFIG_BITTORRENT, bittorrent, [BitTorrent protocol],
1073 [ --enable-bittorrent enable BitTorrent protocol support])
1075 EL_ARG_ENABLE(CONFIG_DATA, data, [Data protocol],
1076 [ --disable-data disable data protocol support])
1078 EL_ARG_ENABLE(CONFIG_URI_REWRITE, uri-rewrite, [URI rewriting],
1079 [ --disable-uri-rewrite disable URI rewrite support])
1081 EL_ARG_DEPEND(CONFIG_CGI, cgi, [HAVE_SETENV_OR_PUTENV:yes], [Local CGI],
1082 [ --enable-cgi enable local CGI support])
1084 EL_ARG_ENABLE(CONFIG_FINGER, finger, [Finger protocol],
1085 [ --enable-finger enable finger protocol support])
1087 dnl ===================================================================
1089 dnl ===================================================================
1092 if test "x${enable_fsp}" != xno; then
1093 AC_CHECK_HEADERS(fsplib.h, HAVE_FSPLIB=yes, HAVE_FSPLIB=no)
1095 if test "$HAVE_FSPLIB" = yes; then
1096 AC_CHECK_LIB(fsplib, fsp_open_session, HAVE_FSPLIB=yes, HAVE_FSPLIB=no)
1097 if test "$HAVE_FSPLIB" = yes; then
1098 LIBS="$LIBS -lfsplib"
1100 AC_CHECK_LIB(fsp, fsp_open_session, HAVE_FSPLIB=yes, HAVE_FSPLIB=no)
1101 if test "$HAVE_FSPLIB" = yes; then
1108 EL_ARG_DEPEND(CONFIG_FSP, fsp, [HAVE_FSPLIB:yes], [FSP protocol],
1109 [ --enable-fsp enable FSP protocol support])
1111 if test "x$CONFIG_FSP" = xno; then
1115 EL_ARG_ENABLE(CONFIG_FTP, ftp, [FTP protocol],
1116 [ --disable-ftp disable ftp protocol support])
1118 EL_ARG_ENABLE(CONFIG_GOPHER, gopher, [Gopher protocol],
1119 [ --enable-gopher enable gopher protocol support])
1121 EL_ARG_ENABLE(CONFIG_NNTP, nntp, [NNTP protocol],
1122 [ --enable-nntp enable nntp protocol support])
1124 EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol],
1125 [ --disable-smb disable SMB protocol support (requires smbclient)])
1128 EL_ARG_ENABLE(CONFIG_MOUSE, mouse, [Mouse handling],
1129 [ --disable-mouse disable mouse support])
1131 # GPM mouse is Linux specific, so ...
1133 EL_ARG_DEPEND(CONFIG_SYSMOUSE, sysmouse,
1134 [CONFIG_MOUSE:yes CONFIG_GPM:no HAVE_SYSMOUSE_HEADER:yes],
1136 [ --disable-sysmouse disable BSD sysmouse support])
1138 EL_ARG_ENABLE(CONFIG_88_COLORS, 88-colors, [88 colors],
1139 [ --enable-88-colors enable 88 color support])
1141 EL_ARG_ENABLE(CONFIG_256_COLORS, 256-colors, [256 colors],
1142 [ --enable-256-colors enable 256 color support])
1145 EL_ARG_ENABLE(CONFIG_EXMODE, exmode, [Exmode interface],
1146 [ --enable-exmode enable exmode (CLI) interface])
1148 EL_ARG_ENABLE(CONFIG_LEDS, leds, [LEDs],
1149 [ --disable-leds disable LEDs support])
1151 EL_ARG_ENABLE(CONFIG_MARKS, marks, [Marks],
1152 [ --disable-marks disable document marks support])
1155 EL_ARG_ENABLE(CONFIG_CSS, css, [Cascading Style Sheets],
1156 [ --disable-css disable Cascading Style Sheet support])
1158 EL_ARG_DEPEND(CONFIG_HTML_HIGHLIGHT, html-highlight, [CONFIG_CSS:yes], [HTML highlighting],
1159 [ --enable-html-highlight HTML highlighting using DOM engine])
1161 dnl Everything in the tree already uses CONFIG_DOM
1162 dnl so resolve CONFIG_HTML_HIGHLIGHT to CONFIG_DOM
1163 EL_CONFIG_DEPENDS(CONFIG_DOM, [CONFIG_HTML_HIGHLIGHT], [DOM engine])
1165 EL_ARG_DEPEND(CONFIG_BACKTRACE, backtrace, [HAVE_EXECINFO:yes], [Backtrace],
1166 [ --disable-backtrace disable backtrace support])
1168 EL_ARG_DEPEND(CONFIG_NO_ROOT_EXEC, no-root, [HAVE_GETUID:yes HAVE_GETEUID:yes], [No root exec],
1169 [ --enable-no-root enable prevention of usage by root])
1172 EL_ARG_ENABLE(CONFIG_DEBUG, debug, [Debug mode],
1173 [ --enable-debug enable leak debug and internal error checking])
1175 EL_ARG_DEPEND(CONFIG_FASTMEM, fastmem, [CONFIG_DEBUG:no], [Fast mode],
1176 [ --enable-fastmem enable direct use of system allocation functions, not usable with --enable-debug])
1178 EL_ARG_ENABLE(CONFIG_OWN_LIBC, own-libc, [Own libc stubs],
1179 [ --enable-own-libc force use of internal functions instead of those of system libc])
1181 EL_ARG_ENABLE(CONFIG_SMALL, small, [Small binary],
1182 [ --enable-small reduce binary size as far as possible (but see the bottom of doc/small.txt!)])
1184 if test "$CONFIG_OPENSSL" != yes &&
1185 test "$CONFIG_GNUTLS_OPENSSL_COMPAT" != yes ||
1186 test "$CONFIG_OWN_LIBC" = yes;
1188 AC_MSG_CHECKING(for built-in MD5 support)
1190 EL_CONFIG(CONFIG_MD5, [Built-in MD5])
1193 AC_SUBST(CONFIG_MD5)
1195 if test "$CONFIG_BITTORRENT" = yes; then
1196 if test "$CONFIG_OPENSSL" != yes ||
1197 test "$CONFIG_OWN_LIBC" = yes;
1199 AC_MSG_CHECKING(for built-in SHA1 support)
1201 EL_CONFIG(CONFIG_SHA1, [Built-in SHA1])
1205 AC_SUBST(CONFIG_SHA1)
1207 if test "$CONFIG_CSS" = yes || test "$CONFIG_DOM" = yes;
1209 EL_CONFIG(CONFIG_SCANNER, [Built-in scanner])
1211 AC_SUBST(CONFIG_SCANNER)
1213 AC_ARG_ENABLE(weehoofooboomookerchoo,
1215 Also check out the features.conf file for more information about features!
1217 [AC_MSG_ERROR(Are you strange, or what?)])
1222 test "$CONFIG_OS2" = yes && LDFLAGS="$LDFLAGS -Zexe"
1223 test "$CONFIG_OS2" = yes && LDFLAGS=`echo "$LDFLAGS" | sed "s/-Zbin-files//g"`
1226 dnl ===================================================================
1227 dnl Export directory paths
1228 dnl ===================================================================
1230 # Set up the ``entry points'' if they were not supplied by builder
1231 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1232 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1234 # Create CONFDIR #define for config.h
1236 # XXX: This may be dependent on a particular version of autoconf. Whatever,
1237 # it's autoconf fault to force us to do such hacks ;p.
1238 if test x"$sysconfdir" = x"\${prefix}/etc"; then
1239 # sysconfdir is set to its default value... fine, let's append /elinks/
1240 # XXX: We can't modify listing of the default in ./configure --help :-(
1241 sysconfdir_n=`eval echo "$sysconfdir"`
1242 sysconfdir=$sysconfdir_n
1243 (echo "$sysconfdir" | grep elinks >/dev/null 2>/dev/null) || \
1244 sysconfdir="$sysconfdir/elinks"
1248 AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR", [Directory containing default config])
1251 # Create LOCALEDIR #define for config.h
1252 LOCALEDIR=`eval echo "$datadir/locale"`
1253 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Directory containing locales])
1256 # Create LIBDIR #define for config.h
1257 LIBDIR=`eval echo "$libdir"`
1258 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [Directory containing libraries])
1261 EL_LOG_CONFIG(CONFDIR, [System configuration directory], [])
1262 EL_LOG_CONFIG(LOCALEDIR, [Locale catalogs directory], [])
1264 dnl ===================================================================
1265 dnl A little fine tuning of gcc specific options (continued)
1266 dnl ===================================================================
1268 if test "x$ac_cv_prog_gcc" = "xyes"; then
1269 if test "$CONFIG_DEBUG" = "yes"; then
1270 dnl We want to see all warnings and live with none (in debug mode).
1271 CFLAGS="$CFLAGS -Werror"
1274 case "`$CC -dumpversion`" in
1276 # These should be ok using -Werror
1279 # If gcc is version 3.3 (or higher?) it emits lots of false positive
1280 # "dereferencing type-punned pointer will break strict-aliasing rules"
1281 # warnings. Disable them by not doing any strict-aliasing. The
1282 # alternative is just too ugly. Thanks gcc guys!! ;)
1283 CFLAGS="$CFLAGS -fno-strict-aliasing"
1286 # Do not show warnings related to (char * | unsigned char *) type
1288 CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-pointer-sign"
1291 # These should be ok using -Werror
1296 # CFLAGS doesn't contain all compile flags. Some will be added only when
1297 # needed in the respective source directory. To get all compile flags
1298 # easily just add CPPFLAGS.
1299 ALL_CFLAGS="$CFLAGS $CPPFLAGS"
1301 EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], [])
1302 EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], [])
1304 dnl ===================================================================
1305 dnl Colored make output
1306 dnl ===================================================================
1308 if test $(`which tput` colors) -ge 4; then
1310 AC_SUBST(MAKE_COLOR)
1313 dnl ===================================================================
1315 dnl ===================================================================
1319 contrib/elinks.spec \
1320 contrib/lua/hooks.lua \
1321 contrib/conv/w3m2links.awk \
1322 doc/man/man1/elinks.1 \
1323 src/intl/gettext/ref-add.sed \
1324 src/intl/gettext/ref-del.sed
1327 abs_srcdir="$(cd "$srcdir" && pwd)"
1328 # builddir is always absolute!
1329 if test "$abs_srcdir" != "$builddir"; then
1330 # Bootstrap the Makefile creation
1331 echo "include $abs_srcdir/Makefile" > "$builddir/Makefile"
1332 "$MAKE" "SRC=$abs_srcdir" init
1333 # Make cg-status ignore this build directory
1334 echo "*" > "$builddir/.gitignore"
1338 dnl ===================================================================
1339 dnl Configuration summary
1340 dnl ===================================================================
1342 AC_MSG_RESULT(The following feature summary has been saved to features.log)