Permalink
Browse files

Update aclocal.m4 and others

Found by: michaelortmann
Patch by: michaelortmann

* update old aclocal code
* update ax_create_stdint_h.m4 from version 2010-03-01 to version 2018-07-27
* move .m4 files into new m4 dir
  • Loading branch information...
michaelortmann authored and vanosg committed Aug 31, 2018
1 parent bddc5b6 commit 13046a99e33b2a40590d0ecee1f3328920cd0cd0
Showing with 64 additions and 46 deletions.
  1. +5 −6 aclocal.m4
  2. +19 −40 { → m4}/ax_create_stdint_h.m4
  3. +40 −0 m4/ax_lib_socket_nsl.m4
  4. 0 { → m4}/tcl.m4
View
@@ -18,10 +18,11 @@ dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl Load tcl macros
builtin(include,tcl.m4)
builtin(include,m4/tcl.m4)
dnl Load GNU stdint.h creator
builtin(include,ax_create_stdint_h.m4)
dnl Load gnu autoconf archive macros
builtin(include,m4/ax_create_stdint_h.m4)
builtin(include,m4/ax_lib_socket_nsl.m4)
dnl
@@ -852,9 +853,7 @@ AC_DEFUN([EGG_CHECK_LIBS],
if test "$IRIX" = yes; then
AC_MSG_WARN([Skipping library tests because they CONFUSE IRIX.])
else
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, connect)
AC_CHECK_LIB(dns, gethostbyname)
AX_LIB_SOCKET_NSL
AC_CHECK_LIB(dl, dlopen)
AC_CHECK_LIB(m, tan, EGG_MATH_LIB="-lm")
@@ -1,5 +1,5 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
# ===========================================================================
#
# SYNOPSIS
@@ -12,9 +12,9 @@
# existence of an include file <stdint.h> that defines a set of typedefs,
# especially uint8_t,int32_t,uintptr_t. Many older installations will not
# provide this file, but some will have the very same definitions in
# <inttypes.h>. In other enviroments we can use the inet-types in
# <inttypes.h>. In other environments we can use the inet-types in
# <sys/types.h> which would define the typedefs int8_t and u_int8_t
# respectivly.
# respectively.
#
# This macros will create a local "_stdint.h" or the headerfile given as
# an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
#
# Remember, if the system already had a valid <stdint.h>, the generated
# file will include it directly. No need for fuzzy HAVE_STDINT_H things...
# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
# compilation and the c99-mode is not the default. Therefore this macro
# will not use the compiler's stdint.h - please complain to the GCC
# developers).
@@ -48,33 +48,12 @@
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
#serial 21
AC_DEFUN([AX_CHECK_DATA_MODEL],[
AC_CHECK_SIZEOF(char)
@@ -173,14 +152,14 @@ AC_CACHE_VAL([ac_cv_header_stdint_t],[
old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
old_CFLAGS="$CFLAGS" ; CFLAGS=""
AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[int_least32_t v = 0;]])],
[ac_cv_stdint_result="(assuming C99 compatible system)"
ac_cv_header_stdint_t="stdint.h"; ],
[ac_cv_header_stdint_t=""])
ac_cv_header_stdint_t="stdint.h";],
[ac_cv_header_stdint_t=""])
if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then
CFLAGS="-std=c99"
AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[int_least32_t v = 0;]])],
[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)], [])
fi
CXXFLAGS="$old_CXXFLAGS"
CPPFLAGS="$old_CPPFLAGS"
@@ -198,7 +177,7 @@ else
AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
fi
if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
if test "_$ac_cv_header_stdint_t" = "_" ; then # cannot shortcircuit..
dnl .....intro message done, now do a few system checks.....
dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
@@ -251,7 +230,7 @@ AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
fi # shortcircut to system "stdint.h"
fi # shortcircuit to system "stdint.h"
# ------------------ PREPARE VARIABLES ------------------------------
if test "$GCC" = "yes" ; then
ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +349,7 @@ echo "" >>$ac_stdint
cat >>$ac_stdint <<STDINT_EOF
/* .................... detections part ............................ */
/* whether we need to define bitspecific types from compiler base types */
/* whether we need to define bit specific types from compiler base types */
#ifndef _STDINT_HEADER_INTPTR
#ifndef _STDINT_HEADER_UINT32
#ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +446,7 @@ typedef u_int32_t uint32_t;
#endif
#ifdef _STDINT_NEED_INT_MODEL_T
/* we must guess all the basic types. Apart from byte-adressable system, */
/* we must guess all the basic types. Apart from byte-addressable system, */
/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
/* (btw, those nibble-addressable systems are way off, or so we assume) */
@@ -655,7 +634,7 @@ typedef long intptr_t;
#endif
#endif
/* These limits are merily those of a two complement byte-oriented system */
/* These limits are merrily those of a two complement byte-oriented system */
/* Minimum of signed integral types. */
# define INT8_MIN (-128)
View
@@ -0,0 +1,40 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_lib_socket_nsl.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_LIB_SOCKET_NSL
#
# DESCRIPTION
#
# This macro figures out what libraries are required on this platform to
# link sockets programs.
#
# The common cases are not to need any extra libraries, or to need
# -lsocket and -lnsl. We need to avoid linking with libnsl unless we need
# it, though, since on some OSes where it isn't necessary it will totally
# break networking. Unisys also includes gethostbyname() in libsocket but
# needs libnsl for socket().
#
# LICENSE
#
# Copyright (c) 2008 Russ Allbery <rra@stanford.edu>
# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
# Copyright (c) 2008 Warren Young <warren@etr-usa.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])
AC_DEFUN([AX_LIB_SOCKET_NSL],
[
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([socket], [socket], [], [
AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
[], [-lnsl])])
])
View
File renamed without changes.

0 comments on commit 13046a9

Please sign in to comment.