gdraheim / zziplib

The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access
Other
62 stars 50 forks source link

AC_COMPILE_CHECK_SIZEOF([long]) prohibits universal builds on macOS #33

Closed mojca closed 6 years ago

mojca commented 6 years ago

It seems that

AC_COMPILE_CHECK_SIZEOF([long])

and friends are only ever used when

AC_CHECK_HEADERS(stdint.h)

fails to find a header. On any recent macOS that header is present, but the above-mentioned configure check fails when trying to build universal binaries:

$ export CFLAGS='-arch i386 -arch x86_64'
$ export CXXFLAGS='-arch i386 -arch x86_64'
$ ./configure
...
checking for off64_t... no
checking for __int64... no
checking size of short... 2
checking size of int... 4
checking size of long... configure: error: cannot determine a size for long
$ echo $?
1
gdraheim commented 6 years ago

done - the checks for int/long/ptr are disabled when stdint.h is available anyway.

mojca commented 6 years ago

Thank you, that works better.

gdraheim commented 6 years ago

done.