Skip to content

Commit

Permalink
Make things work with autoconf-2.71
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Jul 9, 2024
1 parent 33e5b72 commit 58c4bbc
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 83 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2024-07-09 Richard Frith-Macdonald <[email protected]>

* config/codeset.m4:
* config/objc-con-autoload.m4:
* config/pathtls.m4:
* config/pathxml.m4:
* config/procfs.m4:
* configure.ac:
Changes to avoid the use of most obsolete/deprecated autoconf macros.
Change usage of AC_CONFIG_AUX_DIR() to deal with altered behavior in
autoconf-2.71 (shipped on many new systems) where the value we set
in CURRENT_GNUSTEP_MAKEFILES is not available. This should now use
the GNUSTEP_MAKEFILES environment variable or get the output of the
gnustep-config script directly.

2024-06-21 Richard Frith-Macdonald <[email protected]>

* Source/NSDistantObject.m: Use standard method name conventions
Expand Down
9 changes: 5 additions & 4 deletions config/codeset.m4
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET);],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[char* cs = nl_langinfo(CODESET);]])],
[am_cv_langinfo_codeset=yes],
[am_cv_langinfo_codeset=no])
])
if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
Expand Down
10 changes: 6 additions & 4 deletions config/objc-con-autoload.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ AC_DEFUN(OBJC_CON_AUTOLOAD,
AC_MSG_CHECKING(loading of constructor functions)
AC_CACHE_VAL(objc_cv_con_autoload,
[dnl
AC_TRY_RUN([static int loaded = 0;
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[static int loaded = 0;
void cons_functions() __attribute__ ((constructor));
void cons_functions() { loaded = 1; }
int main()
{
return ( (loaded == 1) ? 0 : 1);
}],
objc_cv_con_autoload=yes, objc_cv_con_autoload=no,
objc_cv_con_autoload=no)
}]])],
[objc_cv_con_autoload=yes],
[objc_cv_con_autoload=no],
[objc_cv_con_autoload=no])
case "$target_os" in
cygwin*) objc_cv_con_autoload=yes;;
mingw*) objc_cv_con_autoload=yes;;
Expand Down
16 changes: 12 additions & 4 deletions config/pathtls.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ dnl
dnl Now check if the installed libgnutls is sufficiently new.
dnl
rm -f conf.tlstest
AC_TRY_RUN([
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
Expand All @@ -66,7 +67,10 @@ main()
}
return 0;
}
],, no_tls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
]])],
,
[no_tls=yes],
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
Expand All @@ -89,7 +93,8 @@ dnl
dnl Now check if the installed libtgnuls is sufficiently new.
dnl
rm -f conf.tlstest
AC_TRY_RUN([
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
Expand All @@ -112,7 +117,10 @@ main()
}
return 0;
}
],, no_tls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
]])],
,
[no_tls=yes],
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
Expand Down
16 changes: 12 additions & 4 deletions config/pathxml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ dnl
dnl Now check if the installed libxml is sufficiently new.
dnl
rm -f conf.xmltest
AC_TRY_RUN([
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdlib.h>
#include <stdio.h>
#include <libxml/xmlversion.h>
Expand Down Expand Up @@ -95,7 +96,10 @@ main()
}
return 1;
}
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
]])],
,
[no_xml=yes],
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
Expand All @@ -118,7 +122,8 @@ dnl
dnl Now check if the installed libxml is sufficiently new.
dnl
rm -f conf.xmltest
AC_TRY_RUN([
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdlib.h>
#include <stdio.h>
#include <libxml/xmlversion.h>
Expand Down Expand Up @@ -189,7 +194,10 @@ main()
}
return 1;
}
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
]])],
,
[no_xml=yes],
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
Expand Down
8 changes: 5 additions & 3 deletions config/procfs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ AC_DEFUN(AC_SYS_PROCFS_PSINFO,
AC_CACHE_CHECK([support for /proc psinfo struct], ac_cv_sys_procfs_psinfo,
[if test "$enable_procfs_psinfo" = yes; then
AC_TRY_RUN([#include "$srcdir/config/config.psinfo.c"],
ac_cv_sys_procfs_psinfo=yes, ac_cv_sys_procfs_psinfo=no,
ac_cv_sys_procfs_psinfo=yes)
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[#include "$srcdir/config/config.psinfo.c"]])],
[ac_cv_sys_procfs_psinfo=yes],
[ac_cv_sys_procfs_psinfo=no],
[ac_cv_sys_procfs_psinfo=yes])
elif test "$enable_procfs" = cross; then
ac_cv_sys_procfs_psinfo=no
else
Expand Down
Loading

0 comments on commit 58c4bbc

Please sign in to comment.