Skip to content

Commit 477ef36

Browse files
thedixk0ekk0ek
authored andcommitted
Fix build error with autotools
1 parent 73fd592 commit 477ef36

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ target_include_directories(
166166
target_link_libraries(zone-bench PRIVATE zone)
167167

168168
check_include_file(endian.h HAVE_ENDIAN_H)
169-
if (HAVE_ENDIAN_H)
170-
add_definitions(-DHAVE_ENDIAN_H=1)
171-
endif()
172169

173170
check_include_file(unistd.h HAVE_UNISTD_H)
174171
if(NOT HAVE_UNISTD_H)

configure.ac

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ AC_CONFIG_FILES([Makefile])
1818
m4_include(m4/ax_check_compile_flag.m4)
1919
m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_STDC])
2020

21+
AC_CHECK_HEADER(endian.h, AC_DEFINE(HAVE_ENDIAN_H, 1, [Wether or not have the <endian.h> header file]))
22+
2123
AC_ARG_ENABLE(westmere, AS_HELP_STRING([--disable-westmere],[Disable Westmere (SSE4.2) kernel]))
2224
case "$enable_westmere" in
2325
no) enable_westmere=no ;;

src/config.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* Wether or not have the <endian.h> header file */
2+
#undef HAVE_ENDIAN_H
3+
14
/* Wether or not to compile support for SSE4.2 */
25
#undef HAVE_WESTMERE
36

src/generic/endian.h

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#define le64toh(x) OSSwapLittleToHostInt64(x)
7575

7676
#else
77+
#include "config.h"
7778

7879
#if defined(linux) || defined(__OpenBSD__)
7980
# ifdef HAVE_ENDIAN_H

0 commit comments

Comments
 (0)