From c99f2e94d691fc685bd8ab170b381bf263420039 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Mon, 18 May 2015 21:39:02 +0300 Subject: [PATCH] build: remove few hacks out of many from build had missing logic not worked, probably all packages would have need the missing hack. avoid disabling libtool tests using undocumented interface. do not use internal glibc macros. CFLAGS in automake target should include AM_CFLAGS. CFLAGS -I should not include $includedir - not fixed. Signed-off-by: Alon Bar-Lev --- Makefile.am | 2 ++ configure.ac | 28 +++------------------------- include/dieharder/libdieharder.h | 7 ------- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/Makefile.am b/Makefile.am index 489c493..780007e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,8 @@ SUBDIRS = libdieharder dieharder include # THANKS BUGS SUPPORT dieharder.spec.in dieharder.m4 test_dieharder.sh EXTRA_DIST = autogen.sh set_ld_library_path Copyright +ACLOCAL_AMFLAGS = -I m4 + #======================================================================== # This is the toplevel Makefile for the dieharder project. It has # some specialized targets: diff --git a/configure.ac b/configure.ac index b336115..102bdd0 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,8 @@ AC_SUBST(RELEASED) # Check for which system. #================================================================== AC_CANONICAL_HOST +AC_USE_SYSTEM_EXTENSIONS +AC_SYS_LARGEFILE #================================================================== # Checks for programs. @@ -63,29 +65,8 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET #================================================================== -# OK, these five macros prevent my personal path from appearing -# in the default Makefile, and actually should make it work to -# rebuilt itself even if somebody completely blows off running -# ./autogen.sh. And it ALMOST WORKS -#================================================================== -ACLOCAL="${SHELL} ./missing --run aclocal" -ACTAR="${SHELL} ./missing --run tar" -AUTOCONF="${SHELL} ./missing --run autoconf;echo \"Run ./configure\";exit" -AUTOHEADER="${SHELL} ./missing --run autoheader" -AUTOMAKE="${SHELL} ./missing --run automake --add-missing --copy --gnu" - -AC_SUBST(ACLOCAL) -AC_SUBST(ACTAR) -AC_SUBST(AUTOCONF) -AC_SUBST(AUTOHEADER) -AC_SUBST(AUTOMAKE) - -#================================================================== # Disable unnecessary libtool tests for c++,fortran,java #================================================================== -define([AC_LIBTOOL_LANG_CXX_CONFIG], [:]) -define([AC_LIBTOOL_LANG_F77_CONFIG], [:]) -define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:]) AC_PROG_LIBTOOL #================================================================== @@ -97,16 +78,13 @@ AC_C_VOLATILE AC_C_INLINE DIEHARDER_CFLAGS="-I$includedir" -dieharder_CFLAGS="-std=c99 -Wall -pedantic -I$includedir" -libdieharder_lo_CFLAGS="-Wall -pedantic -I$includedir" DIEHARDER_LIBS="-L$libdir -ldieharder" -ACLOCAL_AMFLAGS="-I m4" +CFLAGS="-I${CFLAGS} -include config.h" AC_SUBST(DIEHARDER_CFLAGS) AC_SUBST(dieharder_CFLAGS) AC_SUBST(libdieharder_lo_CFLAGS) AC_SUBST(DIEHARDER_LIBS) -AC_SUBST(ACLOCAL_AMFLAGS) #================================================================== # Checks for libraries, and headers. Test for dependency libraries diff --git a/include/dieharder/libdieharder.h b/include/dieharder/libdieharder.h index 2138ebf..488bfb8 100644 --- a/include/dieharder/libdieharder.h +++ b/include/dieharder/libdieharder.h @@ -6,23 +6,16 @@ #include "copyright.h" -/* To enable large file support */ -#define _FILE_OFFSET_BITS 64 - #include #include #include #include #include -/* This turns on uint macro in c99 */ -#define __USE_MISC 1 #include #include #include -/* This turns on M_PI in math.h */ -#define __USE_BSD 1 #include #include #include -- 2.3.6