wok-next annotate ucl/stuff/patches/02-Autoreconf.patch @ rev 20302

Up gnustep-make (2.7.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 10 11:12:26 2017 +0100 (2017-11-10)
parents
children
rev   line source
al@19663 1 From: Robert Luberda <robert@debian.org>
al@19663 2 Date: Wed, 21 May 2014 23:23:49 +0200
al@19663 3 Subject: 02 Autoreconf
al@19663 4
al@19663 5 Fix autoconf files to make it possible to call autoreconf, see bug #744671.
al@19663 6 The acc[123].m4 files were extracted from the original aclocal.m4 file.
al@19663 7 ---
al@19663 8 Makefile.am | 2 +
al@19663 9 configure.ac | 4 +-
al@19663 10 examples/Makefile.am | 2 +-
al@19663 11 m4/acc1.m4 | 97 ++++++++++++++++++++++++++++++++++
al@19663 12 m4/acc2.m4 | 42 +++++++++++++++
al@19663 13 m4/acc3.m4 | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++
al@19663 14 src/Makefile.am | 5 +-
al@19663 15 7 files changed, 290 insertions(+), 5 deletions(-)
al@19663 16 create mode 100644 m4/acc1.m4
al@19663 17 create mode 100644 m4/acc2.m4
al@19663 18 create mode 100644 m4/acc3.m4
al@19663 19
al@19663 20 diff --git a/Makefile.am b/Makefile.am
al@19663 21 index 3570c33..f615f27 100644
al@19663 22 --- a/Makefile.am
al@19663 23 +++ b/Makefile.am
al@19663 24 @@ -5,6 +5,8 @@
al@19663 25
al@19663 26 AUTOMAKE_OPTIONS = 1.8.5 foreign
al@19663 27
al@19663 28 +ACLOCAL_AMFLAGS = -I m4
al@19663 29 +
al@19663 30 SUBDIRS = include src examples
al@19663 31
al@19663 32 dist-hook:
al@19663 33 diff --git a/configure.ac b/configure.ac
al@19663 34 index 16adb1d..96ffde0 100644
al@19663 35 --- a/configure.ac
al@19663 36 +++ b/configure.ac
al@19663 37 @@ -47,8 +47,10 @@ AC_CANONICAL_HOST
al@19663 38 AC_CANONICAL_TARGET
al@19663 39 AM_MAINTAINER_MODE
al@19663 40
al@19663 41 +AC_CONFIG_MACRO_DIR([m4])
al@19663 42 +
al@19663 43 if test -z "$ac_abs_top_srcdir"; then
al@19663 44 - _AC_SRCPATHS(.)
al@19663 45 + _AC_SRCDIRS(.)
al@19663 46 fi
al@19663 47 if test -r .Conf.settings1; then
al@19663 48 . ./.Conf.settings1
al@19663 49 diff --git a/examples/Makefile.am b/examples/Makefile.am
al@19663 50 index 4f1be03..bd33c6a 100644
al@19663 51 --- a/examples/Makefile.am
al@19663 52 +++ b/examples/Makefile.am
al@19663 53 @@ -3,7 +3,7 @@
al@19663 54 # Copyright (C) 1996-2004 Markus F.X.J. Oberhumer
al@19663 55 #
al@19663 56
al@19663 57 -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)
al@19663 58 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
al@19663 59
al@19663 60 noinst_PROGRAMS = simple uclpack
al@19663 61
al@19663 62 diff --git a/m4/acc1.m4 b/m4/acc1.m4
al@19663 63 new file mode 100644
al@19663 64 index 0000000..d1ccb5b
al@19663 65 --- /dev/null
al@19663 66 +++ b/m4/acc1.m4
al@19663 67 @@ -0,0 +1,97 @@
al@19663 68 +# serial 1
al@19663 69 +
al@19663 70 +# /***********************************************************************
al@19663 71 +# // standard ACC macros
al@19663 72 +# ************************************************************************/
al@19663 73 +
al@19663 74 +AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
al@19663 75 +AC_C_BIGENDIAN([AC_DEFINE(ACC_ENDIAN_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ENDIAN_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
al@19663 76 +])#
al@19663 77 +
al@19663 78 +AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
al@19663 79 +AC_HEADER_TIME
al@19663 80 +AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h])
al@19663 81 +])#
al@19663 82 +
al@19663 83 +AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
al@19663 84 +AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
al@19663 85 +])#
al@19663 86 +
al@19663 87 +
al@19663 88 +AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
al@19663 89 +AC_CHECK_SIZEOF(short)
al@19663 90 +AC_CHECK_SIZEOF(int)
al@19663 91 +AC_CHECK_SIZEOF(long)
al@19663 92 +
al@19663 93 +AC_CHECK_SIZEOF(ptrdiff_t)
al@19663 94 +AC_CHECK_SIZEOF(size_t)
al@19663 95 +AC_CHECK_SIZEOF(void *)
al@19663 96 +AC_CHECK_SIZEOF(char *)
al@19663 97 +
al@19663 98 +AC_CHECK_SIZEOF(long long)
al@19663 99 +AC_CHECK_SIZEOF(unsigned long long)
al@19663 100 +AC_CHECK_SIZEOF(__int64)
al@19663 101 +AC_CHECK_SIZEOF(unsigned __int64)
al@19663 102 +])#
al@19663 103 +
al@19663 104 +
al@19663 105 +# /***********************************************************************
al@19663 106 +# // Check for ACC_conformance
al@19663 107 +# ************************************************************************/
al@19663 108 +
al@19663 109 +AC_DEFUN([mfx_ACC_ACCCHK], [
al@19663 110 +mfx_tmp=$1
al@19663 111 +mfx_save_CPPFLAGS=$CPPFLAGS
al@19663 112 +dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
al@19663 113 +test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
al@19663 114 +
al@19663 115 +AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
al@19663 116 +
al@19663 117 +AC_LANG_CONFTEST([AC_LANG_PROGRAM(
al@19663 118 +[[#define ACC_CONFIG_NO_HEADER 1
al@19663 119 +#include "acc/acc.h"
al@19663 120 +#include "acc/acc_incd.h"
al@19663 121 +#undef ACCCHK_ASSERT
al@19663 122 +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
al@19663 123 +#include "acc/acc_chk.ch"
al@19663 124 +#undef ACCCHK_ASSERT
al@19663 125 +static void test_acc_compile_time_assert(void) {
al@19663 126 +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
al@19663 127 +#include "acc/acc_chk.ch"
al@19663 128 +#undef ACCCHK_ASSERT
al@19663 129 +}
al@19663 130 +#undef NDEBUG
al@19663 131 +#include <assert.h>
al@19663 132 +static int test_acc_run_time_assert(int r) {
al@19663 133 +#define ACCCHK_ASSERT(expr) assert(expr);
al@19663 134 +#include "acc/acc_chk.ch"
al@19663 135 +#undef ACCCHK_ASSERT
al@19663 136 +return r;
al@19663 137 +}
al@19663 138 +]], [[
al@19663 139 +test_acc_compile_time_assert();
al@19663 140 +if (test_acc_run_time_assert(1) != 1) return 1;
al@19663 141 +]]
al@19663 142 +)])
al@19663 143 +
al@19663 144 +mfx_tmp=FAILED
al@19663 145 +_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
al@19663 146 +rm -f conftest.$ac_ext conftest.$ac_objext
al@19663 147 +
al@19663 148 +CPPFLAGS=$mfx_save_CPPFLAGS
al@19663 149 +
al@19663 150 +AC_MSG_RESULT([$mfx_tmp])
al@19663 151 +case x$mfx_tmp in
al@19663 152 + xpassed | xyes) ;;
al@19663 153 + *)
al@19663 154 + AC_MSG_NOTICE([])
al@19663 155 + AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
al@19663 156 + AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
al@19663 157 + AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
al@19663 158 + AC_MSG_NOTICE([Thanks for your support.])
al@19663 159 + AC_MSG_NOTICE([])
al@19663 160 + AC_MSG_ERROR([ACC conformance test failed. Stop.])
al@19663 161 +dnl AS_EXIT
al@19663 162 + ;;
al@19663 163 +esac
al@19663 164 +])# mfx_ACC_ACCCHK
al@19663 165 diff --git a/m4/acc2.m4 b/m4/acc2.m4
al@19663 166 new file mode 100644
al@19663 167 index 0000000..f0ce59b
al@19663 168 --- /dev/null
al@19663 169 +++ b/m4/acc2.m4
al@19663 170 @@ -0,0 +1,42 @@
al@19663 171 +# serial 1
al@19663 172 +
al@19663 173 +AC_DEFUN([mfx_PROG_CPPFLAGS], [
al@19663 174 +AC_MSG_CHECKING([whether the C preprocessor needs special flags])
al@19663 175 +
al@19663 176 +AC_LANG_CONFTEST([AC_LANG_PROGRAM(
al@19663 177 +[[#include <limits.h>
al@19663 178 +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
al@19663 179 +# include "your C preprocessor is broken 1"
al@19663 180 +#elif (0xffffu == 0xfffffffful)
al@19663 181 +# include "your C preprocessor is broken 2"
al@19663 182 +#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
al@19663 183 +# include "your C preprocessor is broken 3"
al@19663 184 +#endif
al@19663 185 +]], [[ ]]
al@19663 186 +)])
al@19663 187 +
al@19663 188 +mfx_save_CPPFLAGS=$CPPFLAGS
al@19663 189 +mfx_tmp=ERROR
al@19663 190 +for mfx_arg in "" -no-cpp-precomp
al@19663 191 +do
al@19663 192 + CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
al@19663 193 + _AC_COMPILE_IFELSE([],
al@19663 194 +[mfx_tmp=$mfx_arg
al@19663 195 +break])
al@19663 196 +done
al@19663 197 +CPPFLAGS=$mfx_save_CPPFLAGS
al@19663 198 +rm -f conftest.$ac_ext conftest.$ac_objext
al@19663 199 +case x$mfx_tmp in
al@19663 200 + x)
al@19663 201 + AC_MSG_RESULT([none needed]) ;;
al@19663 202 + xERROR)
al@19663 203 + AC_MSG_RESULT([ERROR])
al@19663 204 + AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
al@19663 205 + ;;
al@19663 206 + *)
al@19663 207 + AC_MSG_RESULT([$mfx_tmp])
al@19663 208 + CPPFLAGS="$mfx_tmp $CPPFLAGS"
al@19663 209 + ;;
al@19663 210 +esac
al@19663 211 +])# mfx_PROG_CPPFLAGS
al@19663 212 +
al@19663 213 diff --git a/m4/acc3.m4 b/m4/acc3.m4
al@19663 214 new file mode 100644
al@19663 215 index 0000000..a6ff628
al@19663 216 --- /dev/null
al@19663 217 +++ b/m4/acc3.m4
al@19663 218 @@ -0,0 +1,143 @@
al@19663 219 +# serial 3
al@19663 220 +
al@19663 221 +AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
al@19663 222 +AC_CACHE_CHECK([whether limits.h is sane],
al@19663 223 +mfx_cv_header_sane_limits_h,
al@19663 224 +[AC_TRY_COMPILE([#include <limits.h>
al@19663 225 +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
al@19663 226 +# if defined(__APPLE__) && defined(__GNUC__)
al@19663 227 +# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
al@19663 228 +# else
al@19663 229 +# include "your preprocessor is broken"
al@19663 230 +# endif
al@19663 231 +#endif
al@19663 232 +#define MFX_0xffff 0xffff
al@19663 233 +#define MFX_0xffffffffL 4294967295ul
al@19663 234 +#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
al@19663 235 +# include "error CHAR_BIT"
al@19663 236 +#endif
al@19663 237 +#if !defined(UCHAR_MAX)
al@19663 238 +# include "error UCHAR_MAX 1"
al@19663 239 +#endif
al@19663 240 +#if !defined(USHRT_MAX)
al@19663 241 +# include "error USHRT_MAX 1"
al@19663 242 +#endif
al@19663 243 +#if !defined(UINT_MAX)
al@19663 244 +# include "error UINT_MAX 1"
al@19663 245 +#endif
al@19663 246 +#if !defined(ULONG_MAX)
al@19663 247 +# include "error ULONG_MAX 1"
al@19663 248 +#endif
al@19663 249 +#if !defined(SHRT_MAX)
al@19663 250 +# include "error SHRT_MAX 1"
al@19663 251 +#endif
al@19663 252 +#if !defined(INT_MAX)
al@19663 253 +# include "error INT_MAX 1"
al@19663 254 +#endif
al@19663 255 +#if !defined(LONG_MAX)
al@19663 256 +# include "error LONG_MAX 1"
al@19663 257 +#endif
al@19663 258 +#if (UCHAR_MAX < 1)
al@19663 259 +# include "error UCHAR_MAX 2"
al@19663 260 +#endif
al@19663 261 +#if (USHRT_MAX < 1)
al@19663 262 +# include "error USHRT_MAX 2"
al@19663 263 +#endif
al@19663 264 +#if (UINT_MAX < 1)
al@19663 265 +# include "error UINT_MAX 2"
al@19663 266 +#endif
al@19663 267 +#if (ULONG_MAX < 1)
al@19663 268 +# include "error ULONG_MAX 2"
al@19663 269 +#endif
al@19663 270 +#if (UCHAR_MAX < 0xff)
al@19663 271 +# include "error UCHAR_MAX 3"
al@19663 272 +#endif
al@19663 273 +#if (USHRT_MAX < MFX_0xffff)
al@19663 274 +# include "error USHRT_MAX 3"
al@19663 275 +#endif
al@19663 276 +#if (UINT_MAX < MFX_0xffff)
al@19663 277 +# include "error UINT_MAX 3"
al@19663 278 +#endif
al@19663 279 +#if (ULONG_MAX < MFX_0xffffffffL)
al@19663 280 +# include "error ULONG_MAX 3"
al@19663 281 +#endif
al@19663 282 +#if (USHRT_MAX > UINT_MAX)
al@19663 283 +# include "error USHRT_MAX vs UINT_MAX"
al@19663 284 +#endif
al@19663 285 +#if (UINT_MAX > ULONG_MAX)
al@19663 286 +# include "error UINT_MAX vs ULONG_MAX"
al@19663 287 +#endif
al@19663 288 +],[
al@19663 289 +#if (USHRT_MAX == MFX_0xffff)
al@19663 290 +{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
al@19663 291 +#elif (USHRT_MAX >= MFX_0xffff)
al@19663 292 +{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
al@19663 293 +#endif
al@19663 294 +#if (UINT_MAX == MFX_0xffff)
al@19663 295 +{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
al@19663 296 +#elif (UINT_MAX >= MFX_0xffff)
al@19663 297 +{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
al@19663 298 +#endif
al@19663 299 +#if (ULONG_MAX == MFX_0xffff)
al@19663 300 +{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
al@19663 301 +#elif (ULONG_MAX >= MFX_0xffff)
al@19663 302 +{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
al@19663 303 +#endif
al@19663 304 +#if (USHRT_MAX == MFX_0xffffffffL)
al@19663 305 +{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
al@19663 306 +#elif (USHRT_MAX >= MFX_0xffffffffL)
al@19663 307 +{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
al@19663 308 +#endif
al@19663 309 +#if (UINT_MAX == MFX_0xffffffffL)
al@19663 310 +{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
al@19663 311 +#elif (UINT_MAX >= MFX_0xffffffffL)
al@19663 312 +{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
al@19663 313 +#endif
al@19663 314 +#if (ULONG_MAX == MFX_0xffffffffL)
al@19663 315 +{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
al@19663 316 +#elif (ULONG_MAX >= MFX_0xffffffffL)
al@19663 317 +{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
al@19663 318 +#endif
al@19663 319 +],
al@19663 320 +mfx_cv_header_sane_limits_h=yes,
al@19663 321 +mfx_cv_header_sane_limits_h=no)])
al@19663 322 +])
al@19663 323 +
al@19663 324 +# /***********************************************************************
al@19663 325 +# //
al@19663 326 +# ************************************************************************/
al@19663 327 +
al@19663 328 +dnl more types which are not yet covered by ACC
al@19663 329 +
al@19663 330 +AC_DEFUN([mfx_CHECK_SIZEOF], [
al@19663 331 +AC_CHECK_SIZEOF(__int32)
al@19663 332 +AC_CHECK_SIZEOF(unsigned __int32)
al@19663 333 +AC_CHECK_SIZEOF(intmax_t)
al@19663 334 +AC_CHECK_SIZEOF(uintmax_t)
al@19663 335 +AC_CHECK_SIZEOF(intptr_t)
al@19663 336 +AC_CHECK_SIZEOF(uintptr_t)
al@19663 337 +
al@19663 338 +AC_CHECK_SIZEOF(float)
al@19663 339 +AC_CHECK_SIZEOF(double)
al@19663 340 +AC_CHECK_SIZEOF(long double)
al@19663 341 +
al@19663 342 +AC_CHECK_SIZEOF(dev_t)
al@19663 343 +AC_CHECK_SIZEOF(fpos_t)
al@19663 344 +AC_CHECK_SIZEOF(mode_t)
al@19663 345 +AC_CHECK_SIZEOF(off_t)
al@19663 346 +AC_CHECK_SIZEOF(ssize_t)
al@19663 347 +AC_CHECK_SIZEOF(time_t)
al@19663 348 +])#
al@19663 349 +
al@19663 350 +
al@19663 351 +
al@19663 352 +AC_DEFUN([mfx_CHECK_LIB_WINMM], [
al@19663 353 +if test "X$GCC" = Xyes; then
al@19663 354 +case $host_os in
al@19663 355 +cygwin* | mingw* | pw32*)
al@19663 356 + LIBS="$LIBS -lwinmm" ;;
al@19663 357 +*)
al@19663 358 + ;;
al@19663 359 +esac
al@19663 360 +fi
al@19663 361 +])#
al@19663 362 diff --git a/src/Makefile.am b/src/Makefile.am
al@19663 363 index 78d0e51..bdb99a0 100644
al@19663 364 --- a/src/Makefile.am
al@19663 365 +++ b/src/Makefile.am
al@19663 366 @@ -6,9 +6,8 @@
al@19663 367 VPATH = @srcdir@@UCL_ASM_VPATH@
al@19663 368 SUFFIXES = .S
al@19663 369
al@19663 370 -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)
al@19663 371 -CPPFLAGS = $(UCL_CPPFLAGS) $(configure_CPPFLAGS) $(UCL_EXTRA_CPPFLAGS)
al@19663 372 -CFLAGS = $(UCL_CFLAGS) $(configure_CFLAGS) $(UCL_EXTRA_CFLAGS)
al@19663 373 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) $(UCL_CPPFLAGS) $(configure_CPPFLAGS) $(UCL_EXTRA_CPPFLAGS)
al@19663 374 +AM_CFLAGS = $(UCL_CFLAGS) $(configure_CFLAGS) $(UCL_EXTRA_CFLAGS)
al@19663 375
al@19663 376 lib_LTLIBRARIES = libucl.la
al@19663 377