Skip to content

Commit

Permalink
Removed further outdated Autoconf tests.
Browse files Browse the repository at this point in the history
See commits 09017a3 and 95c799f for details and the corresponding
CMake changes.
  • Loading branch information
jriesmeier committed Jan 20, 2025
1 parent 95c799f commit 231ed56
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 1,843 deletions.
192 changes: 0 additions & 192 deletions config/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -344,30 +344,6 @@ fi
rm -f conftest*])


dnl AC_CHECK_STD_NAMESPACE checks if the C++-Compiler supports the
dnl standard name space.
dnl
dnl AC_CHECK_STD_NAMESPACE
AC_DEFUN(AC_CHECK_STD_NAMESPACE,
[AC_MSG_CHECKING([for C++ standard namespace])
AH_TEMPLATE(HAVE_STD_NAMESPACE, [Define if ANSI standard C++ includes use std namespace.])
AC_CACHE_VAL(ac_cv_check_std_namespace,
[AC_TRY_COMPILE_AND_LINK([
#include <iostream>
using namespace std;
],[
cout << "Hello World" << endl;
], eval "ac_cv_check_std_namespace=yes", eval "ac_cv_check_std_namespace=no")dnl
])dnl
if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STD_NAMESPACE)
else
AC_MSG_RESULT(no)
fi
])


dnl AC_CHECK_GNU_LIBTOOL checks whether libtool is GNU libtool.
dnl This macro requires that 'libtool' exists in the current path,
dnl i.e. AC_CHECK_PROGS(LIBTOOL, libtool, :) should be executed and evaluated
Expand Down Expand Up @@ -514,75 +490,6 @@ fi
])


dnl AC_CHECK_INTP_ACCEPT checks if the prototype for accept()
dnl specifies arguments 2-4 to be int* instead of size_t *.
dnl
dnl AC_CHECK_INTP_ACCEPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
AC_DEFUN(AC_CHECK_INTP_ACCEPT,
[AC_MSG_CHECKING([ifelse([$1], , [if accept() needs int* parameters],
[if accept() needs int* parameters (in $1)])])
AH_TEMPLATE(HAVE_INTP_ACCEPT, [Define if your system declares argument 3 of accept()
as int * instead of size_t * or socklen_t *.])
ifelse([$1], , [ac_includes=""
],
[ac_includes=""
for ac_header in $1
do
ac_includes="$ac_includes
#include<$ac_header>"
done])
AC_CACHE_VAL(ac_cv_prototype_intp_accept,
[AC_TRY_COMPILE(
[#ifdef __cplusplus
extern "C" {
#endif
$ac_includes
#ifdef __cplusplus
}
#endif
]
,
[
int i;
struct sockaddr *addr;
size_t addrlen;
addr = 0;
addrlen = 0;
i = accept(1, addr, &addrlen);
],
eval "ac_cv_prototype_intp_accept=no",
[AC_TRY_COMPILE(
[#ifdef __cplusplus
extern "C" {
#endif
$ac_includes
#ifdef __cplusplus
}
#endif
]
,
[
int i;
struct sockaddr *addr;
int addrlen;
addr = 0;
addrlen = 0;
i = accept(1, addr, &addrlen);
],
eval "ac_cv_prototype_intp_accept=yes", eval "ac_cv_prototype_intp_accept=no")])])
if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_INTP_ACCEPT)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
ifelse([$3], , , [$3])
fi
])


dnl AC_CHECK_PTHREAD_OPTION checks whether the compiler requires the
dnl -pthread option to correctly link code containing posix thread calls.
dnl This is true for example on FreeBSD.
Expand Down Expand Up @@ -680,105 +587,6 @@ fi
])


dnl AC_CHECK_INTP_GETSOCKOPT checks if the prototype for getsockopt()
dnl specifies arguments 5 to be int* instead of size_t *.
dnl
dnl AC_CHECK_INTP_GETSOCKOPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
AC_DEFUN(AC_CHECK_INTP_GETSOCKOPT,
[AC_MSG_CHECKING([ifelse([$1], , [if getsockopt() needs int* parameters],
[if getsockopt() needs int* parameters (in $1)])])
AH_TEMPLATE(HAVE_INTP_GETSOCKOPT, [Define if your system declares argument 5 of getsockopt()
as int * instead of size_t * or socklen_t.])
ifelse([$1], , [ac_includes=""
],
[ac_includes=""
for ac_header in $1
do
ac_includes="$ac_includes
#include<$ac_header>"
done])
AC_CACHE_VAL(ac_cv_prototype_intp_getsockopt,
[AC_TRY_COMPILE(
[#ifdef __cplusplus
extern "C" {
#endif
$ac_includes
#ifdef __cplusplus
}
#endif
]
,
[
int i;
size_t optlen;
i = getsockopt(0, 0, 0, 0, &optlen);
],
eval "ac_cv_prototype_intp_getsockopt=no",
[AC_TRY_COMPILE(
[#ifdef __cplusplus
extern "C" {
#endif
$ac_includes
#ifdef __cplusplus
}
#endif
]
,
[
int i;
int optlen;
i = getsockopt(0, 0, 0, 0, &optlen);
],
eval "ac_cv_prototype_intp_getsockopt=yes", eval "ac_cv_prototype_intp_getsockopt=no")])])
if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_INTP_GETSOCKOPT)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
ifelse([$3], , , [$3])
fi
])


dnl AC_CXX_STD_NOTHROW checks if the compiler supports non-throwing new using
dnl std::nothrow.
dnl
AC_DEFUN([AC_CXX_STD_NOTHROW],
[AH_TEMPLATE(HAVE_STD__NOTHROW, [Define if the compiler supports std::nothrow.])
AC_CACHE_CHECK(whether the compiler supports std::nothrow,
ac_cv_cxx_std_nothrow,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <new>],[int *i = new (std::nothrow) int],
ac_cv_cxx_std_nothrow=yes, ac_cv_cxx_std_nothrow=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_std_nothrow" = yes; then
AC_DEFINE(HAVE_STD__NOTHROW)
fi
])


dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using
dnl std::nothrow.
dnl
AC_DEFUN([AC_CXX_NOTHROW_DELETE],
[AH_TEMPLATE(HAVE_NOTHROW_DELETE, [Define if the compiler supports operator delete (std::nothrow).])
AC_CACHE_CHECK(whether the compiler supports operator delete (std::nothrow),
ac_cv_cxx_nothrow_delete,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <new>],[int *i = new (std::nothrow) int; operator delete (i,std::nothrow)],
ac_cv_cxx_nothrow_delete=yes, ac_cv_cxx_nothrow_delete=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_nothrow_delete" = yes; then
AC_DEFINE(HAVE_NOTHROW_DELETE)
fi
])


dnl AC_CXX_STATIC_ASSERT checks if the compiler supports static_assert.
dnl
AC_DEFUN([AC_CXX_STATIC_ASSERT],
Expand Down
Loading

0 comments on commit 231ed56

Please sign in to comment.