Fix autoconf deprecation warnings
Hi,
When working with the autoconf rule for detecting __int128 I noticed we
get a lot of warnings like the below in the autconf trace output so I
decided to clean them up. All the macros we get complaints about seems
to have been made obsolete between 2000 and 2003, and since we have a
generated configure in the repository I personally think it is
reasonable to drop support for such ancient versions of autoconf.
m4trace:configure.in:376: -1- _m4_warn([obsolete], [The macro
`AC_TRY_COMPILE' is obsolete.
The patch is split into four parts since there are several different
obsolete macros (AC_TRY_*, AC_LANG_SAVE/AC_LANG_RESTORE,
AC_DECL_SYS_SIGLIST) which I replace. Feel free to squash the patches
into one if you wish.
The second patch in the series removes a handful of empty main functions
from configure. As far as I can tell these cannot have any use, and with
the use of the AC_LANG_* macros they were easy to remove.
--
Andreas Karlsson
Attachments:
0001-Replace-obsolete-macros-AC_TRY_-with-AC_-_IFELSE.patchtext/x-patch; name=0001-Replace-obsolete-macros-AC_TRY_-with-AC_-_IFELSE.patchDownload+87-85
0002-Prefer-AC_LANG_SOURCE-over-AC_LANG_PROGRAM-where-mai.patchtext/x-patch; name=0002-Prefer-AC_LANG_SOURCE-over-AC_LANG_PROGRAM-where-mai.patchDownload+6-28
0003-Replace-obsolete-macros-AC_LANG_SAVE-AC_LANG_RESTORE.patchtext/x-patch; name=0003-Replace-obsolete-macros-AC_LANG_SAVE-AC_LANG_RESTORE.patchDownload+2-5
0004-Replace-obsolete-macro-AC_DECL_SYS_SIGLIST-with-AC_C.patchtext/x-patch; name=0004-Replace-obsolete-macro-AC_DECL_SYS_SIGLIST-with-AC_C.patchDownload+2-10
I have attached new versions which apply on the current master.
Andreas
Attachments:
0001-Replace-obsolete-macros-AC_TRY_-with-AC_-_IFELSE.patchtext/x-patch; name=0001-Replace-obsolete-macros-AC_TRY_-with-AC_-_IFELSE.patchDownload+97-95
0002-Prefer-AC_LANG_SOURCE-over-AC_LANG_PROGRAM-where-mai.patchtext/x-patch; name=0002-Prefer-AC_LANG_SOURCE-over-AC_LANG_PROGRAM-where-mai.patchDownload+6-28
0003-Replace-obsolete-macros-AC_LANG_SAVE-AC_LANG_RESTORE.patchtext/x-patch; name=0003-Replace-obsolete-macros-AC_LANG_SAVE-AC_LANG_RESTORE.patchDownload+2-5
0004-Replace-obsolete-macro-AC_DECL_SYS_SIGLIST-with-AC_C.patchtext/x-patch; name=0004-Replace-obsolete-macro-AC_DECL_SYS_SIGLIST-with-AC_C.patchDownload+2-10
On 05/31/2015 05:22 AM, Andreas Karlsson wrote:
I have attached new versions which apply on the current master.
Thanks, applied.
--- a/configure.in +++ b/configure.in @@ -1473,7 +1473,7 @@ if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().]) fi-AC_DECL_SYS_SIGLIST +AC_CHECK_DECLS([sys_siglist])AC_CHECK_FUNC(syslog,
[AC_CHECK_HEADER(syslog.h,
Hmm, according to the autoconf manual:
Macro: AC_DECL_SYS_SIGLIST
Same as:
AC_CHECK_DECLS([sys_siglist], [], [],
[#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
])See AC_CHECK_DECLS.
So I replaced AC_DECL_SYS_SIGLIST with that full snippet instead.
- Heikki
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers