diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-07-02 19:21:23 +0300 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-07-02 19:21:23 +0300 |
| commit | a2edb023d08778c3346bbbf4ca82ef7f6e9283eb (patch) | |
| tree | 8870e94d8dc629cbafb73487309737167ca6bf77 /config/acx_pthread.m4 | |
| parent | 7b156c1e0746a46d083d7dbcd28afb303b3484ef (diff) | |
| download | postgresql-a2edb023d08778c3346bbbf4ca82ef7f6e9283eb.tar.gz | |
Replace obsolete autoconf macros with their modern replacements.
AC_TRY_COMPILE(...) -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM(...)])
AC_TRY_LINK(...) -> AC_LINK_IFELSE([AC_LANG_PROGRAM(...)])
AC_TRY_RUN(...) -> AC_RUN_IFELSE([AC_LANG_PROGRAM(...)])
AC_LANG_SAVE/RESTORE -> AC_LANG_PUSH/POP
AC_DECL_SYS_SIGLIST -> AC_CHECK_DECLS(...) (per snippet in autoconf manual)
Also use AC_LANG_SOURCE instead of AC_LANG_PROGRAM, where the main()
function is not needed.
With these changes, autoconf -Wall doesn't complain anymore.
Andreas Karlsson
Diffstat (limited to 'config/acx_pthread.m4')
| -rw-r--r-- | config/acx_pthread.m4 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4 index 581164b1e5..793b7b71a4 100644 --- a/config/acx_pthread.m4 +++ b/config/acx_pthread.m4 @@ -5,8 +5,7 @@ dnl upstream changes! dnl AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C +AC_LANG_PUSH([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h @@ -122,10 +121,10 @@ for flag in $acx_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. - AC_TRY_LINK([#include <pthread.h>], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ])], [acx_pthread_ok=yes], [acx_pthread_ok=no]) if test "x$acx_pthread_ok" = xyes; then @@ -167,5 +166,5 @@ fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) -AC_LANG_RESTORE +AC_LANG_POP([C]) ])dnl ACX_PTHREAD |
