@@ -122,10 +122,24 @@ enable_sockets="no" # TODO check_pedantic="no" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ;; +hppa*-*-hpux*) + dnl Don't default to -g: It creates errors from the assembler and breaks + dnl exceptions. + AS_IF([test x"$OBJCFLAGS" = x""], [OBJCFLAGS="-O2"]) + dnl HP-UX 11.11's inttypes.h defines UINTPTR_MAX etc. to nothing. GCC's + dnl stdint.h defines those correctly, but if inttypes.h gets included + dnl after something included stdint.h, it gets broken again. Therefore, + dnl always include inttypes.h as the very first thing. + dnl We need to put this into OBJCFLAGS and not CPPFLAGS as CPPFLAGS are + dnl also used for .S files. + OBJCFLAGS="$OBJCFLAGS -include inttypes.h" + dnl We need -latomic for GCC's atomics to work. + LIBS="$LIBS -latomic" + ;; esac AS_IF([test x"$host_os" = x"msdosdjgpp" -a x"$build_os" = x"msdosdjgpp"], [ dnl Hack to make configure find these on DOS. : ${AR:=ar.exe} @@ -840,10 +854,12 @@ esac AC_CHECK_LIB(m, fmod, LIBS="$LIBS -lm") AC_CHECK_LIB(complex, creal, TESTS_LIBS="$TESTS_LIBS -lcomplex") +AC_CHECK_FUNCS(strtof truncf) + AC_CHECK_FUNC(asprintf, [ case "$host" in *-*-mingw*) dnl asprintf from MinGW is broken on older Windows versions have_asprintf="no" @@ -1244,20 +1260,22 @@ ]) OBJCFLAGS="$old_OBJCFLAGS" ]) AC_CHECK_HEADERS(dirent.h) -AC_CHECK_FUNCS([sysconf gmtime_r localtime_r nanosleep]) +AC_CHECK_FUNCS([sysconf gmtime_r localtime_r]) case "$host_os" in amigaos* | morphos*) - dnl There is a symbol, but we cannot use fcntl() for sockets on - dnl AmigaOS / MorphOS. + dnl We don't want fcntl() or nanosleep() on AmigaOS / MorphOS, despite + dnl a symbol existing. The reason is that we cannot use fcntl() for + dnl sockets and that nanosleep() is yet another function that uses + dnl errno, so would need to be passed from the linklib. ;; *) AC_CHECK_HEADERS(fcntl.h) - AC_CHECK_FUNCS(fcntl) + AC_CHECK_FUNCS([fcntl nanosleep]) ;; esac AC_CHECK_HEADERS(xlocale.h) AC_CHECK_FUNCS([strtod_l strtof_l asprintf_l])