Better fixes for compiling on FreeBSD and OpenBSD.
This commit is contained in:
parent
975d888d65
commit
320cc754a2
17
configure.in
17
configure.in
|
@ -32,15 +32,15 @@ ARCH_LIBS=""
|
||||||
ARCH_CFLAGS=""
|
ARCH_CFLAGS=""
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
case $host in
|
case $host in
|
||||||
*-*-mingw32* | *-*-windows*)
|
*-*-mingw32* | *-*-windows*)
|
||||||
acx_host_arch="WIN32"
|
acx_host_arch="WIN32"
|
||||||
acx_host_winapi="MSWINDOWS"
|
acx_host_winapi="MSWINDOWS"
|
||||||
;;
|
;;
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
acx_host_arch="UNIX"
|
acx_host_arch="UNIX"
|
||||||
acx_host_winapi="CARBON"
|
acx_host_winapi="CARBON"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
acx_host_arch="UNIX"
|
acx_host_arch="UNIX"
|
||||||
acx_host_winapi="XWINDOWS"
|
acx_host_winapi="XWINDOWS"
|
||||||
;;
|
;;
|
||||||
|
@ -66,8 +66,15 @@ ac_ext=cpp
|
||||||
dnl check compiler
|
dnl check compiler
|
||||||
ACX_CHECK_CXX
|
ACX_CHECK_CXX
|
||||||
|
|
||||||
dnl macros we should do testing with
|
dnl different platforms have somewhat incompatible requirements for
|
||||||
CXXFLAGS="$CXXFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500"
|
dnl BSD and Posix macros.
|
||||||
|
case $host in
|
||||||
|
*-*-openbsd* | *-*-freebsd*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CXXFLAGS="$CXXFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl checks for libraries
|
dnl checks for libraries
|
||||||
if test x"$acx_host_arch" = xUNIX; then
|
if test x"$acx_host_arch" = xUNIX; then
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_INET_ATON
|
||||||
|
# include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_ALLOCA_H
|
#if HAVE_ALLOCA_H
|
||||||
# define freea(x_)
|
# define freea(x_)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -67,12 +67,6 @@
|
||||||
#define __FP__
|
#define __FP__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Need this on FreeBSD to get nanosleep. We can't define this on, say,
|
|
||||||
// Linux because that unconditionally defines it.
|
|
||||||
#if defined(__FreeBSD__)
|
|
||||||
#define _POSIX_VERSION 199506L
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// define NULL
|
// define NULL
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
|
|
Loading…
Reference in New Issue