1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Autoupdated configure.in and config/m4/*.m4. Obsolete macros removed.

This commit is contained in:
Witold Filipczyk 2007-07-05 15:03:59 +02:00 committed by Witold Filipczyk
parent 286982f787
commit f4384eaf10
9 changed files with 57 additions and 95 deletions

View File

@ -5,10 +5,7 @@ dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET], AC_DEFUN([AM_LANGINFO_CODESET],
[ [
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[char* cs = nl_langinfo(CODESET);]])],[am_cv_langinfo_codeset=yes],[am_cv_langinfo_codeset=no])
[char* cs = nl_langinfo(CODESET);],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
]) ])
if test $am_cv_langinfo_codeset = yes; then if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1, AC_DEFINE(HAVE_LANGINFO_CODESET, 1,

View File

@ -125,7 +125,7 @@ AC_DEFUN([EL_CHECK_CODE],
[ [
$2=yes; $2=yes;
AC_MSG_CHECKING([for $1]) AC_MSG_CHECKING([for $1])
AC_TRY_COMPILE([$3], [$4], [EL_DEFINE($2, [$1])], $2=no) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$3]], [[$4]])],[EL_DEFINE($2, [$1])],[$2=no])
AC_MSG_RESULT([$]$2) AC_MSG_RESULT([$]$2)
]) ])
@ -134,10 +134,9 @@ AC_DEFUN([EL_CHECK_TYPE],
[ [
EL_CHECK_TYPE_LOCAL=yes; EL_CHECK_TYPE_LOCAL=yes;
AC_MSG_CHECKING([for $1]) AC_MSG_CHECKING([for $1])
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h> #include <sys/types.h>
], [int a = sizeof($1);], ]], [[int a = sizeof($1);]])],[EL_CHECK_TYPE_LOCAL=yes],[EL_CHECK_TYPE_LOCAL=no])
[EL_CHECK_TYPE_LOCAL=yes], [EL_CHECK_TYPE_LOCAL=no])
AC_MSG_RESULT([$]EL_CHECK_TYPE_LOCAL) AC_MSG_RESULT([$]EL_CHECK_TYPE_LOCAL)
if test "x[$]EL_CHECK_TYPE_LOCAL" != "xyes"; then if test "x[$]EL_CHECK_TYPE_LOCAL" != "xyes"; then
AC_DEFINE($1, $2, [Define to $2 if <sys/types.h> doesn't define.]) AC_DEFINE($1, $2, [Define to $2 if <sys/types.h> doesn't define.])

View File

@ -20,22 +20,18 @@ AC_DEFUN([AM_ICONV],
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#include <iconv.h>], #include <iconv.h>]], [[iconv_t cd = iconv_open("","");
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL); iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);], iconv_close(cd);]])],[am_cv_func_iconv=yes],[])
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS" am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv" LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#include <iconv.h>], #include <iconv.h>]], [[iconv_t cd = iconv_open("","");
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL); iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);], iconv_close(cd);]])],[am_cv_lib_iconv=yes
am_cv_lib_iconv=yes am_cv_func_iconv=yes],[])
am_cv_func_iconv=yes)
LIBS="$am_save_LIBS" LIBS="$am_save_LIBS"
fi fi
]) ])
@ -43,7 +39,7 @@ AC_DEFUN([AM_ICONV],
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration]) AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [ AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h> #include <stdlib.h>
#include <iconv.h> #include <iconv.h>
extern extern
@ -55,7 +51,7 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
#else #else
size_t iconv(); size_t iconv();
#endif #endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") ]], [[]])],[am_cv_proto_iconv_arg1=""],[am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:- AC_MSG_RESULT([$]{ac_t:-

View File

@ -4,8 +4,8 @@
# because gettext's gettext.m4 (distributed in the automake package) # because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader # still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics: # give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX # configure.in:556: AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[]) was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX]) undefine([AC_ISC_POSIX])

View File

@ -13,8 +13,7 @@
AC_DEFUN([AM_LC_MESSAGES], AC_DEFUN([AM_LC_MESSAGES],
[if test $ac_cv_header_locale_h = yes; then [if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <locale.h>]], [[return LC_MESSAGES]])],[am_cv_val_LC_MESSAGES=yes],[am_cv_val_LC_MESSAGES=no])])
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1, AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.]) [Define if your <locale.h> file defines LC_MESSAGES.])

View File

@ -6,8 +6,7 @@ AC_DEFUN([EL_CONFIG_OS_OS2],
EL_SAVE_FLAGS EL_SAVE_FLAGS
CFLAGS="$CFLAGS -Zmt" CFLAGS="$CFLAGS -Zmt"
AC_TRY_LINK([#include <stdlib.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]], [[_beginthread(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no])
[_beginthread(NULL, NULL, 0, NULL)], cf_result=yes, cf_result=no)
AC_MSG_RESULT($cf_result) AC_MSG_RESULT($cf_result)
if test "$cf_result" = yes; then if test "$cf_result" = yes; then
@ -28,14 +27,10 @@ AC_DEFUN([EL_CONFIG_OS_OS2],
if test -n "$X11ROOT"; then if test -n "$X11ROOT"; then
CFLAGS="$CFLAGS_X -I$X11ROOT/XFree86/include" CFLAGS="$CFLAGS_X -I$X11ROOT/XFree86/include"
LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86_gcc" LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86_gcc"
AC_TRY_LINK([#include <pty.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pty.h>]], [[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)]])],[cf_result=yes],[cf_result=no])
[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)],
cf_result=yes, cf_result=no)
if test "$cf_result" = no; then if test "$cf_result" = no; then
LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86" LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86"
AC_TRY_LINK([#include <pty.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pty.h>]], [[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)]])],[cf_result=yes],[cf_result=no])
[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)],
cf_result=yes, cf_result=no)
fi fi
fi fi

View File

@ -78,9 +78,7 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then
CFLAGS="$RUBY_CFLAGS $CFLAGS" CFLAGS="$RUBY_CFLAGS $CFLAGS"
CPPFLAGS="$CPPFLAGS $RUBY_CFLAGS" CPPFLAGS="$CPPFLAGS $RUBY_CFLAGS"
AC_TRY_LINK([#include <ruby.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[ruby_init();]])],[CONFIG_SCRIPTING_RUBY=yes],[CONFIG_SCRIPTING_RUBY=no])
[ruby_init();],
CONFIG_SCRIPTING_RUBY=yes, CONFIG_SCRIPTING_RUBY=no)
else else
AC_MSG_RESULT([Ruby header files not found]) AC_MSG_RESULT([Ruby header files not found])
fi fi

View File

@ -5,8 +5,7 @@ AC_DEFUN([EL_CONFIG_OS_WIN32],
EL_SAVE_FLAGS EL_SAVE_FLAGS
AC_TRY_LINK([#include <stdlib.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]], [[_beginthread(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no])
[_beginthread(NULL, NULL, 0, NULL)], cf_result=yes, cf_result=no)
AC_MSG_RESULT($cf_result) AC_MSG_RESULT($cf_result)
if test "$cf_result" = yes; then if test "$cf_result" = yes; then

View File

@ -4,7 +4,8 @@ dnl Autoconf 2.13 generates an incomplete config.h.in; see ELinks bug 936.
dnl Autoconf 2.59 is installed in the computer that generates our daily dnl Autoconf 2.59 is installed in the computer that generates our daily
dnl snapshots, so we need to be compatible with that. dnl snapshots, so we need to be compatible with that.
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(src/main/main.c) AC_INIT
AC_CONFIG_SRCDIR([src/main/main.c])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
PACKAGE=elinks PACKAGE=elinks
@ -117,7 +118,7 @@ EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manu
EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats]) EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats])
dnl gcc specific options (to be continued at the bottom of configure) dnl gcc specific options (to be continued at the bottom of configure)
if test "x$ac_cv_prog_gcc" = "xyes"; then if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
dnl We want to see all warnings and live with none. dnl We want to see all warnings and live with none.
dnl We can't set up -Werror here as there may be some warnings in test dnl We can't set up -Werror here as there may be some warnings in test
dnl suite of configure, and we don't want to fail them. dnl suite of configure, and we don't want to fail them.
@ -134,9 +135,9 @@ AC_DEFUN([EL_CHECK_COMPILER_MACROS],
AC_MSG_CHECKING([for $2]) AC_MSG_CHECKING([for $2])
for flag in $3; do for flag in $3; do
AC_TRY_COMPILE(, [#ifndef $flag AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef $flag
kill me! kill me!
#endif ], $1=yes, $1=no) #endif ]])],[$1=yes],[$1=no])
if test "[$]$1" = yes; then if test "[$]$1" = yes; then
EL_CONFIG([$1], [$2]) EL_CONFIG([$1], [$2])
break break
@ -273,7 +274,7 @@ dnl happily ignoring it and stderr not being checked for error messages.
AC_MSG_CHECKING([for -rdynamic]) AC_MSG_CHECKING([for -rdynamic])
LDFLAGS_X="$LDFLAGS" LDFLAGS_X="$LDFLAGS"
LDFLAGS="$LDFLAGS -rdynamic" LDFLAGS="$LDFLAGS -rdynamic"
AC_TRY_LINK([], [], have_rdynamic=yes, have_rdynamic=no) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[have_rdynamic=yes],[have_rdynamic=no])
test "$have_rdynamic" = no && LDFLAGS="$LDFLAGS_X" test "$have_rdynamic" = no && LDFLAGS="$LDFLAGS_X"
AC_MSG_RESULT($have_rdynamic) AC_MSG_RESULT($have_rdynamic)
@ -300,7 +301,7 @@ AC_CHECK_FUNCS(getifaddrs getpwnam inet_pton inet_ntop)
AC_CHECK_FUNCS(fflush fork fsync fseeko ftello sigaction) AC_CHECK_FUNCS(fflush fork fsync fseeko ftello sigaction)
AC_CHECK_FUNCS(gettimeofday clock_gettime) AC_CHECK_FUNCS(gettimeofday clock_gettime)
AC_HAVE_FUNCS(cygwin_conv_to_full_win32_path) AC_CHECK_FUNCS([cygwin_conv_to_full_win32_path])
AC_CHECK_FUNCS(setenv putenv, HAVE_SETENV_OR_PUTENV=yes) AC_CHECK_FUNCS(setenv putenv, HAVE_SETENV_OR_PUTENV=yes)
AC_CHECK_FUNCS(getuid, HAVE_GETUID=yes) AC_CHECK_FUNCS(getuid, HAVE_GETUID=yes)
@ -317,28 +318,26 @@ AC_CHECK_FUNCS(kill, HAVE_KILL=yes)
if test x"$HAVE_RAISE" = x; then if test x"$HAVE_RAISE" = x; then
if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then
AC_ERROR([Unable to emulate raise()]) AC_MSG_ERROR([Unable to emulate raise()])
fi fi
fi fi
AC_CACHE_CHECK([for __va_copy],el_cv_HAVE_VA_COPY,[ AC_CACHE_CHECK([for __va_copy],el_cv_HAVE_VA_COPY,[
AC_TRY_LINK([#include <stdarg.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
va_list ap1,ap2;], [__va_copy(ap1,ap2);], va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],[el_cv_HAVE_VA_COPY=yes],[el_cv_HAVE_VA_COPY=no])])
el_cv_HAVE_VA_COPY=yes,el_cv_HAVE_VA_COPY=no)])
if test x"$el_cv_HAVE_VA_COPY" = x"yes"; then if test x"$el_cv_HAVE_VA_COPY" = x"yes"; then
EL_DEFINE(HAVE_VA_COPY, __va_copy) EL_DEFINE(HAVE_VA_COPY, __va_copy)
fi fi
AC_CACHE_CHECK([for sysconf(_SC_PAGE_SIZE)],el_cv_HAVE_SC_PAGE_SIZE,[ AC_CACHE_CHECK([for sysconf(_SC_PAGE_SIZE)],el_cv_HAVE_SC_PAGE_SIZE,[
AC_TRY_LINK([#include <unistd.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
], [int page_size = sysconf(_SC_PAGE_SIZE);], ]], [[int page_size = sysconf(_SC_PAGE_SIZE);]])],[el_cv_HAVE_SC_PAGE_SIZE=yes],[el_cv_HAVE_SC_PAGE_SIZE=no])])
el_cv_HAVE_SC_PAGE_SIZE=yes,el_cv_HAVE_SC_PAGE_SIZE=no)])
if test x"$el_cv_HAVE_SC_PAGE_SIZE" = x"yes"; then if test x"$el_cv_HAVE_SC_PAGE_SIZE" = x"yes"; then
EL_DEFINE(HAVE_SC_PAGE_SIZE, _SC_PAGE_SIZE) EL_DEFINE(HAVE_SC_PAGE_SIZE, _SC_PAGE_SIZE)
fi fi
AC_CACHE_CHECK([for C99 vsnprintf],el_cv_HAVE_C99_VSNPRINTF,[ AC_CACHE_CHECK([for C99 vsnprintf],el_cv_HAVE_C99_VSNPRINTF,[
AC_TRY_RUN([ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
@ -370,8 +369,7 @@ void foo(const char *format, ...) {
exit(0); exit(0);
} }
main() { foo("hello\n"); } main() { foo("hello\n"); }
], ]])],[el_cv_HAVE_C99_VSNPRINTF=yes],[el_cv_HAVE_C99_VSNPRINTF=no],[el_cv_HAVE_C99_VSNPRINTF=cross])])
el_cv_HAVE_C99_VSNPRINTF=yes,el_cv_HAVE_C99_VSNPRINTF=no,el_cv_HAVE_C99_VSNPRINTF=cross)])
if test x"$el_cv_HAVE_C99_VSNPRINTF" = x"yes"; then if test x"$el_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
EL_DEFINE(HAVE_C99_VSNPRINTF, [C99 compliant vsnprintf()]) EL_DEFINE(HAVE_C99_VSNPRINTF, [C99 compliant vsnprintf()])
fi fi
@ -604,10 +602,10 @@ if test "$enable_see" = "yes"; then
SEE_CFLAGS="`$SEE_CONFIG --cppflags`" SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
CPPFLAGS="$SEE_CFLAGS $CPPFLAGS" CPPFLAGS="$SEE_CFLAGS $CPPFLAGS"
LIBS="$SEE_LIBS $LIBS_X" LIBS="$SEE_LIBS $LIBS_X"
AC_TRY_LINK([#include <see/see.h>],[#if SEE_VERSION_API_MAJOR < 2 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <see/see.h>]], [[#if SEE_VERSION_API_MAJOR < 2
#error SEE too old #error SEE too old
#endif #endif
], cf_result=yes, cf_result=no) ]])],[cf_result=yes],[cf_result=no])
EL_RESTORE_FLAGS EL_RESTORE_FLAGS
if test "$cf_result" = yes; then if test "$cf_result" = yes; then
LIBS="$SEE_LIBS $LIBS" LIBS="$SEE_LIBS $LIBS"
@ -655,10 +653,8 @@ if test -z "$disable_spidermonkey"; then
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS" CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS" CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
AC_TRY_LINK([#define XP_UNIX AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define XP_UNIX
#include <jsapi.h>], #include <jsapi.h>]], [[JS_GetReservedSlot(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no])
[JS_GetReservedSlot(NULL, NULL, 0, NULL)],
cf_result=yes, cf_result=no)
fi fi
done done
done done
@ -789,29 +785,24 @@ if test "$enable_perl" = "yes"; then
LIBS="$PERL_LIBS $LIBS" LIBS="$PERL_LIBS $LIBS"
CFLAGS="$PERL_CFLAGS $CFLAGS" CFLAGS="$PERL_CFLAGS $CFLAGS"
CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
AC_TRY_LINK([ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <EXTERN.h> #include <EXTERN.h>
#include <perl.h> #include <perl.h>
#include <perlapi.h> #include <perlapi.h>
], ]], [[PerlInterpreter *my_perl = perl_alloc();]])],[cf_result=yes],[cf_result=no])
[PerlInterpreter *my_perl = perl_alloc();],
cf_result=yes, cf_result=no)
fi fi
if test "$cf_result"; then AC_MSG_RESULT($cf_result); fi if test "$cf_result"; then AC_MSG_RESULT($cf_result); fi
AC_MSG_CHECKING([whether POPpx works without an n_a variable]) AC_MSG_CHECKING([whether POPpx works without an n_a variable])
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <EXTERN.h> #include <EXTERN.h>
#include <perl.h> #include <perl.h>
extern PerlInterpreter *my_perl; extern PerlInterpreter *my_perl;
], ]], [[dSP; (void) POPpx;]])],[AC_MSG_RESULT([yes])
[dSP; (void) POPpx;],
[AC_MSG_RESULT([yes])
AC_DEFINE([CONFIG_PERL_POPPX_WITHOUT_N_A], [1], AC_DEFINE([CONFIG_PERL_POPPX_WITHOUT_N_A], [1],
[Define if using Perl 5.8.8 or later, where the "POPpx" macro [Define if using Perl 5.8.8 or later, where the "POPpx" macro
no longer needs an "n_a" variable like it did in 5.8.7])], no longer needs an "n_a" variable like it did in 5.8.7])],[AC_MSG_RESULT([no])])
[AC_MSG_RESULT([no])])
if test "$cf_result" != "yes"; then if test "$cf_result" != "yes"; then
EL_RESTORE_FLAGS EL_RESTORE_FLAGS
@ -855,9 +846,7 @@ if test "$enable_python" = "yes"; then
PYTHON_LIBS="`$PYTHON -c 'from distutils import sysconfig; var = sysconfig.get_config_var; print "%s %s %s -L%s -lpython%s" % (var("LINKFORSHARED"), var("LIBS"), var("SYSLIBS"), var("LIBPL"), var("VERSION"))'`" PYTHON_LIBS="`$PYTHON -c 'from distutils import sysconfig; var = sysconfig.get_config_var; print "%s %s %s -L%s -lpython%s" % (var("LINKFORSHARED"), var("LIBS"), var("SYSLIBS"), var("LIBPL"), var("VERSION"))'`"
LIBS="$PYTHON_LIBS $LIBS" LIBS="$PYTHON_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
AC_TRY_LINK([#include <Python.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <Python.h>]], [[Py_Initialize();]])],[cf_result=yes],[cf_result=no])
[Py_Initialize();],
cf_result=yes, cf_result=no)
if test "$cf_result" != "yes"; then if test "$cf_result" != "yes"; then
EL_RESTORE_FLAGS EL_RESTORE_FLAGS
@ -921,17 +910,15 @@ if test -z "$disable_lua"; then
CPPFLAGS="$CPPFLAGS_X $LUA_CFLAGS" CPPFLAGS="$CPPFLAGS_X $LUA_CFLAGS"
# Check that it is a compatible Lua version # Check that it is a compatible Lua version
AC_TRY_LINK([ #include <lua.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h>
#include <lualib.h>], #include <lualib.h>]], [[ lua_State *L = lua_open();
[ lua_State *L = lua_open();
luaopen_base(L); luaopen_base(L);
luaopen_table(L); luaopen_table(L);
luaopen_io(L); luaopen_io(L);
luaopen_string(L); luaopen_string(L);
luaopen_math(L); luaopen_math(L);
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
lua_close(L);], lua_close(L);]])],[cf_result=yes],[cf_result=no])
cf_result=yes, cf_result=no)
fi fi
done done
done done
@ -1029,13 +1016,9 @@ else
else else
LIBS="-lssl -lcrypto $LIBS_X" LIBS="-lssl -lcrypto $LIBS_X"
fi fi
AC_TRY_LINK([#include <openssl/ssl.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], [[OpenSSL_add_all_algorithms()]])],[cf_result=yes],[cf_result=no])
[OpenSSL_add_all_algorithms()],
cf_result=yes, cf_result=no)
if test "$cf_result" != yes; then if test "$cf_result" != yes; then
AC_TRY_LINK([#include <openssl/ssl.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], [[SSLeay_add_ssl_algorithms()]])],[cf_result=yes],[cf_result=no])
[SSLeay_add_ssl_algorithms()],
cf_result=yes, cf_result=no)
fi fi
fi fi
done done
@ -1093,10 +1076,8 @@ else
# Verify if it's really usable. gnutls_session was # Verify if it's really usable. gnutls_session was
# renamed to gnutls_session_t before GNU TLS 1.2.0 # renamed to gnutls_session_t before GNU TLS 1.2.0
# (on 2004-06-13); ELinks now requires this. # (on 2004-06-13); ELinks now requires this.
AC_TRY_LINK([#include <gnutls/gnutls.h>], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]], [[gnutls_session_t dummy;
[gnutls_session_t dummy; gnutls_check_version(NULL)]])],[cf_result=yes],[cf_result=no])
gnutls_check_version(NULL)],
cf_result=yes, cf_result=no)
fi fi
if test "$cf_result" = yes; then if test "$cf_result" = yes; then
@ -1168,8 +1149,7 @@ if test x"$no_x" != xyes; then
LDFLAGS="$LDFLAGS -L$x_libraries" LDFLAGS="$LDFLAGS -L$x_libraries"
fi fi
LIBS="-lX11 $LIBS" LIBS="-lX11 $LIBS"
AC_TRY_LINK([#include <X11/Xlib.h>],[XrmInitialize()], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XrmInitialize()]])],[cf_result=yes],[cf_result=no])
cf_result=yes, cf_result=no)
EL_RESTORE_FLAGS EL_RESTORE_FLAGS
if test "$cf_result" = yes; then if test "$cf_result" = yes; then
if test -n "$x_libraries"; then if test -n "$x_libraries"; then
@ -1433,7 +1413,7 @@ dnl ===================================================================
dnl A little fine tuning of gcc specific options (continued) dnl A little fine tuning of gcc specific options (continued)
dnl =================================================================== dnl ===================================================================
if test "x$ac_cv_prog_gcc" = "xyes"; then if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
if test "$CONFIG_DEBUG" = "yes"; then if test "$CONFIG_DEBUG" = "yes"; then
dnl We want to see all warnings and live with none (in debug mode). dnl We want to see all warnings and live with none (in debug mode).
CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -Werror"
@ -1470,9 +1450,7 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then
AC_MSG_CHECKING([whether $CC accepts -Wno-always-true]) AC_MSG_CHECKING([whether $CC accepts -Wno-always-true])
EL_SAVE_FLAGS EL_SAVE_FLAGS
CFLAGS="$CFLAGS -Wno-always-true" CFLAGS="$CFLAGS -Wno-always-true"
AC_TRY_COMPILE([], [], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[AC_MSG_RESULT([yes])],[EL_RESTORE_FLAGS
[AC_MSG_RESULT([yes])],
[EL_RESTORE_FLAGS
AC_MSG_RESULT([no])]) AC_MSG_RESULT([no])])
fi fi
@ -1494,7 +1472,7 @@ dnl ===================================================================
dnl Generated files dnl Generated files
dnl =================================================================== dnl ===================================================================
AC_OUTPUT([ \ AC_CONFIG_FILES([ \
Makefile.config \ Makefile.config \
contrib/elinks.spec \ contrib/elinks.spec \
contrib/lua/hooks.lua \ contrib/lua/hooks.lua \
@ -1503,6 +1481,7 @@ AC_OUTPUT([ \
src/intl/gettext/ref-add.sed \ src/intl/gettext/ref-add.sed \
src/intl/gettext/ref-del.sed src/intl/gettext/ref-del.sed
]) ])
AC_OUTPUT
abs_srcdir="$(cd "$srcdir" && pwd)" abs_srcdir="$(cd "$srcdir" && pwd)"
# builddir is always absolute! # builddir is always absolute!