1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00

Fixed some autoconf bit rot.

Autoconf 2.68 is more picky about correct macro usage and thus I fixed
some wrong call conventions for AC_LANG_PROGRAM.  Also factored an m4
conditional construct out from AC_INIT to avoid the "not a literal"
warning.
This commit is contained in:
Werner Koch 2011-08-09 10:32:21 +02:00
parent c156a636c6
commit cc6ddd1dac
9 changed files with 72 additions and 215 deletions

View File

@ -1,3 +1,7 @@
2011-08-09 Werner Koch <wk@g10code.com>
* configure.ac: Fix usage of AC_LANG_PROGRAM.
2010-12-28 Werner Koch <wk@g10code.com>
* configure.ac (git_revision): Add new m4 macro.

View File

@ -27,14 +27,15 @@ min_automake_version="1.9.3"
# "svn up" and "autogen.sh --force" right before creating a distribution.
m4_define([my_version], [1.4.12])
m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
| awk '/^\* / {printf "%s",$3}']))
AC_INIT([gnupg],
[my_version[]m4_if(my_issvn,[yes],
[m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])],
[bug-gnupg@gnu.org])
m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes],
[m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])
AC_INIT([gnupg],[my_full_version],[http://bugs.gnupg.org])
# Set development_version to yes if the minor number is odd or you
# feel that the default check for a development version is not
# sufficient.
@ -713,10 +714,10 @@ if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns
# code to use the BIND 8 resolver API.
AC_MSG_CHECKING([whether the resolver is usable])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>],
#include <resolv.h>]],
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],have_resolver=yes,have_resolver=no)
AC_MSG_RESULT($have_resolver)
@ -725,11 +726,11 @@ if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns
if test x"$have_resolver" != xyes ; then
AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define BIND_8_COMPAT
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>],
#include <resolv.h>]],
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes])
AC_MSG_RESULT($have_resolver)
fi
@ -978,8 +979,8 @@ GNUPG_TIME_T_UNSIGNED
# Ensure that we have UINT64_C before we bother to check for uint64_t
AC_CHECK_HEADERS([inttypes.h])
AC_CACHE_CHECK([for UINT64_C], [gnupg_cv_uint64_c_works],
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>],[
uint64_t foo=UINT64_C(42);]),gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <inttypes.h>]],[[
uint64_t foo=UINT64_C(42);]])],gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
if test "$gnupg_cv_uint64_c_works" = "yes" ; then
AC_CHECK_SIZEOF(uint64_t)
@ -1413,7 +1414,7 @@ if test "$GCC" = yes; then
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wno-pointer-sign"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
AC_MSG_RESULT($_gcc_psign)
CFLAGS=$_gcc_cflags_save;

View File

@ -1,128 +0,0 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
#include <locale.h>
/* The LC_MESSAGES locale category is the category used by the functions
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
warning, don't define LC_MESSAGES in this case. */
#if !defined LC_MESSAGES && !defined __LOCALE_H
# define LC_MESSAGES 1729
#endif
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
# define gettext gettext
#endif
#ifndef PARAMS
# if __STDC__ || defined __cplusplus
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext PARAMS ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
int __category));
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n));
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n,
int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain PARAMS ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain PARAMS ((const char *__domainname,
const char *__dirname));
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
/* Optimized version of the functions above. */
#if defined __OPTIMIZED
/* These are macros, but could also be inline functions. */
# define gettext(msgid) \
dgettext (NULL, msgid)
# define dgettext(domainname, msgid) \
dcgettext (domainname, msgid, LC_MESSAGES)
# define ngettext(msgid1, msgid2, n) \
dngettext (NULL, msgid1, msgid2, n)
# define dngettext(domainname, msgid1, msgid2, n) \
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
#endif /* Optimizing. */
#ifdef __cplusplus
}
#endif
#endif /* libintl.h */

View File

@ -1,3 +1,7 @@
2011-08-09 Werner Koch <wk@g10code.com>
* libcurl.m4: s/ifelse/m4_if/.
2009-07-21 Werner Koch <wk@g10code.com>
* estream.m4: New. Taken from libestream.

View File

@ -58,7 +58,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AC_ARG_WITH(libcurl,
AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
[_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
[_libcurl_with=$withval],[_libcurl_with=m4_if([$1],,[yes],[$1])])
if test "$_libcurl_with" != "no" ; then
@ -82,7 +82,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
[libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
_libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
_libcurl_wanted=`echo m4_if([$2],,[0],[$2]) | $_libcurl_version_parse`
if test $_libcurl_wanted -gt 0 ; then
AC_CACHE_CHECK([for libcurl >= version $2],
@ -141,7 +141,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_save_libs=$LIBS
LIBS="$LIBCURL $LIBS"
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
/* Try and use a few common options to force a failure if we are
missing symbols or can't link. */
int x;
@ -152,7 +152,7 @@ x=CURLOPT_FILE;
x=CURLOPT_ERRORBUFFER;
x=CURLOPT_STDERR;
x=CURLOPT_VERBOSE;
]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
@ -251,10 +251,10 @@ x=CURLOPT_VERBOSE;
if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
# This is the IF-NO path
ifelse([$4],,:,[$4])
m4_if([$4],,:,[$4])
else
# This is the IF-YES path
ifelse([$3],,:,[$3])
m4_if([$3],,:,[$3])
fi
unset _libcurl_with

View File

@ -43,9 +43,9 @@ AC_DEFUN([GNUPG_CHECK_LIBUSB],
AC_MSG_CHECKING([whether libusb is present and sane])
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <usb.h>],[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <usb.h>]],[[
usb_bulk_write(NULL,0,NULL,0,0);
]),_found_libusb=yes,_found_libusb=no)
]])],_found_libusb=yes,_found_libusb=no)
AC_MSG_RESULT([$_found_libusb])

View File

@ -30,18 +30,18 @@ AC_DEFUN([GNUPG_CHECK_READLINE],
AC_MSG_CHECKING([whether readline via \"$_combo\" is present and sane])
AC_LINK_IFELSE(AC_LANG_PROGRAM([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
],[
]],[[
rl_completion_func_t *completer;
add_history("foobar");
rl_catch_signals=0;
rl_inhibit_completion=0;
rl_attempted_completion_function=NULL;
rl_completion_matches(NULL,NULL);
]),_found_readline=yes,_found_readline=no)
]])],_found_readline=yes,_found_readline=no)
AC_MSG_RESULT([$_found_readline])

View File

@ -1,12 +0,0 @@
/^msgid /{
x
s/m/m/
ta
r en@boldquot.header
g
N
bb
:a
x
:b
}

View File

@ -1,12 +0,0 @@
/^msgid /{
x
s/m/m/
ta
r en@quot.header
g
N
bb
:a
x
:b
}