forked from mirrors/tftp-hpa-google
Move feature test macros into configure.in -> CFLAGS so we don't
end up with mismatch between "configure" and compile time
This commit is contained in:
parent
fd7a812f26
commit
5ec55f35e9
4 changed files with 27 additions and 19 deletions
18
configure.in
18
configure.in
|
@ -11,6 +11,22 @@ AC_ISC_POSIX
|
|||
AC_AIX
|
||||
AC_MINIX
|
||||
AC_PROG_CC
|
||||
|
||||
dnl
|
||||
dnl Feature-test macros. These need to be set in CFLAGS, rather in
|
||||
dnl acconfig.h, or "configure" will run in a different environment than
|
||||
dnl we eventually we build in.
|
||||
dnl
|
||||
|
||||
dnl Needed on Solaris/cc or Solaris/gcc
|
||||
CFLAGS="$CFLAGS -D_XPG4_2"
|
||||
CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
|
||||
CFLAGS="$CFLAGS -D__EXTENSIONS__"
|
||||
|
||||
dnl Needed on some glibc systems
|
||||
CFLAGS="$CFLAGS -D_BSD_SOURCE"
|
||||
CFLAGS="$CFLAGS -D_ISO9X_SOURCE"
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
|
@ -46,6 +62,7 @@ AC_CHECK_HEADERS(unistd.h)
|
|||
AC_CHECK_HEADERS(sys/filio.h)
|
||||
AC_CHECK_HEADERS(sys/stat.h)
|
||||
AC_CHECK_HEADERS(sys/types.h)
|
||||
AC_CHECK_HEADERS(arpa/inet.h)
|
||||
dnl This is needed on some versions of FreeBSD...
|
||||
AC_CHECK_HEADERS(machine/param.h)
|
||||
|
||||
|
@ -55,6 +72,7 @@ AC_CHECK_TYPES(uint16_t)
|
|||
AC_CHECK_TYPES(uint32_t)
|
||||
AC_CHECK_TYPES(u_short)
|
||||
AC_CHECK_TYPES(u_long)
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
|
||||
AC_SEARCH_LIBS(socket, socket, , [AC_MSG_ERROR(socket library not found)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue