summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4c8e33f)
Both macros are considered obsolete. AC_TRY_RUN has been obsoleted
by AC_RUN_IFELSE while AC_TRY_LINK has been replaced by AC_LINK_IFELSE.
This patch replaces all occurrences of these two obsolete macros and
bumps the required autoconf version to 2.61 (which was released in
2006 and is shipped with Ubuntu Hardy).
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT(paraslash, [git], maan@systemlinux.org)
+AC_INIT([paraslash],[git],[maan@systemlinux.org])
AC_CONFIG_HEADER([config.h])
AC_PATH_PROG(UNAMEPATH, uname, no)
AC_CONFIG_HEADER([config.h])
AC_PATH_PROG(UNAMEPATH, uname, no)
[AC_CHECK_FUNCS(snprintf vsnprintf)
AC_MSG_CHECKING(for working snprintf)
AC_CACHE_VAL(ac_cv_have_working_snprintf,
[AC_CHECK_FUNCS(snprintf vsnprintf)
AC_MSG_CHECKING(for working snprintf)
AC_CACHE_VAL(ac_cv_have_working_snprintf,
-[AC_TRY_RUN(
-[#include <stdio.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
-}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
+}]])],[ac_cv_have_working_snprintf=yes],
+[ac_cv_have_working_snprintf=no],[ac_cv_have_working_snprintf=cross])])
AC_MSG_RESULT([$ac_cv_have_working_snprintf])
AC_MSG_CHECKING(for working vsnprintf)
AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
AC_MSG_RESULT([$ac_cv_have_working_snprintf])
AC_MSG_CHECKING(for working vsnprintf)
AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
-[AC_TRY_RUN(
-[#include <stdio.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
#include <stdarg.h>
int my_vsnprintf (char *buf, const char *tmpl, ...)
#include <stdarg.h>
int my_vsnprintf (char *buf, const char *tmpl, ...)
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
-}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
+}]])],[ac_cv_have_working_vsnprintf=yes],
+[ac_cv_have_working_vsnprintf=no],[ac_cv_have_working_vsnprintf=cross])])
AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
AC_MSG_ERROR([fatal: buggy snprintf() detected])
AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
AC_MSG_ERROR([fatal: buggy snprintf() detected])
],[])
########################################################################### ucred
AC_MSG_CHECKING(for struct ucred)
],[])
########################################################################### ucred
AC_MSG_CHECKING(for struct ucred)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
struct ucred sucred; sucred.pid=0;
struct ucred sucred; sucred.pid=0;
-],[have_ucred=yes],[have_ucred=no])
+]])],[have_ucred=yes],[have_ucred=no])
AC_MSG_RESULT($have_ucred)
if test ${have_ucred} = yes; then
AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
AC_MSG_RESULT($have_ucred)
if test ${have_ucred} = yes; then
AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
########################################################################### ip_mreqn
AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
########################################################################### ip_mreqn
AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <netdb.h>
#include <net/if.h>
#include <netdb.h>
#include <net/if.h>
struct ip_mreqn mn;
mn.imr_ifindex = 0;
struct ip_mreqn mn;
mn.imr_ifindex = 0;
-],[have_ip_mreqn=yes],[have_ip_mreqn=no])
+]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
AC_MSG_RESULT($have_ip_mreqn)
if test ${have_ip_mreqn} = yes; then
AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
AC_MSG_RESULT($have_ip_mreqn)
if test ${have_ip_mreqn} = yes; then
AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
########################################################################### osx
AC_MSG_CHECKING(for CoreAudio (MacOs))
########################################################################### osx
AC_MSG_CHECKING(for CoreAudio (MacOs))
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <CoreAudio/CoreAudio.h>
#include <CoreAudio/CoreAudio.h>
-],[have_core_audio=yes],[have_core_audio=no])
+]])],[have_core_audio=yes],[have_core_audio=no])
AC_MSG_RESULT($have_core_audio)
if test ${have_core_audio} = yes; then
f1="-framework CoreAudio"
AC_MSG_RESULT($have_core_audio)
if test ${have_core_audio} = yes; then
f1="-framework CoreAudio"
fi
AC_MSG_CHECKING(for libid3tag)
fi
AC_MSG_CHECKING(for libid3tag)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
struct id3_tag t = {.flags = 0};
struct id3_tag t = {.flags = 0};
-],[], [have_libid3tag=no])
+]])],[],[have_libid3tag=no])
AC_MSG_RESULT($have_libid3tag)
if test ${have_libid3tag} = yes; then
AC_MSG_RESULT($have_libid3tag)
if test ${have_libid3tag} = yes; then