Browse Source

Bugfix: autoheader isn't smart enough to figure out variable defines, so use AH_TEMPLATE for each possible header

Luke Dashjr 13 years ago
parent
commit
639054d53c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      configure.ac

+ 5 - 1
configure.ac

@@ -434,6 +434,10 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([static int __attribute__((warn_unused_result)
 
 
 # byteswap functions
+AH_TEMPLATE([HAVE_BYTESWAP_H], [Define to use byteswap macros from byteswap.h])
+AH_TEMPLATE([HAVE_ENDIAN_H], [Define to use byteswap macros from endian.h])
+AH_TEMPLATE([HAVE_SYS_ENDIAN_H], [Define to use byteswap macros from sys/endian.h])
+AH_TEMPLATE([HAVE_LIBKERN_OSBYTEORDER_H], [Define to use byteswap macros from libkern/OSByteOrder.h])
 BSWAP=''
 for sym in __builtin_bswap __bswap_ bswap_ __swap swap OSSwapInt; do
 	AC_MSG_CHECKING([for ${sym}* functions])
@@ -453,7 +457,7 @@ for sym in __builtin_bswap __bswap_ bswap_ __swap swap OSSwapInt; do
 				AC_MSG_RESULT([yes])
 			else
 				AC_MSG_RESULT([found in ${headerfile}])
-				AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$headerfile]), 1, [Define to use byteswap macros from <${headerfile}>])
+				AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$headerfile]), 1)
 			fi
 			break 2
 		],[])