Ignore:
Timestamp:
Jul 15, 2008, 10:16:06 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Build on HP-UX systems: disable unsupported warning flags, define _XOPEN_SOURCE_EXTENDED where appropriate, use AC_C_INLINE to avoid using the inline keyword when unsupported, and use #pragma INIT for library initialisation routines.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r2526 r2527  
    1111AC_PROG_CPP
    1212AC_PROG_LIBTOOL
     13
     14AC_C_INLINE
     15
     16# Optimizations
     17AC_TRY_CFLAGS(-g -O2, CFLAGS="${CFLAGS} -g -O2")
     18# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
     19AC_TRY_CFLAGS(-Wall, CFLAGS="${CFLAGS} -Wall")
     20AC_TRY_CFLAGS(-W, CFLAGS="${CFLAGS} -W")
     21AC_TRY_CFLAGS(-Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare, CFLAGS="${CFLAGS} -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare")
    1322
    1423case "${host_os}" in
     
    5059AC_MSG_CHECKING(for recv() return value)
    5160ac_v_recv_t="int"
    52 AC_TRY_COMPILE([#include <sys/types.h>
    53   #include <sys/socket.h>],
     61AC_TRY_COMPILE([#define _XOPEN_SOURCE_EXTENDED
     62                #include <sys/types.h>
     63                #include <sys/socket.h>],
    5464 [ssize_t recv(int s, void *buf, size_t len, int flags);],
    5565 [ac_v_recv_t="ssize_t"])
    5666AC_MSG_RESULT($ac_v_recv_t)
    5767AC_DEFINE_UNQUOTED(RECV_T, $ac_v_recv_t, [Define to the recv() return type])
     68
     69AC_MSG_CHECKING(for pragma INIT/FINI)
     70AC_TRY_COMPILE([],
     71 [#pragma INIT "my_init"
     72  void my_init(void)],
     73 [AC_MSG_RESULT(yes)
     74  AC_DEFINE(HAVE_PRAGMA_INIT, 1, [Define to 1 if you have pragma INIT])],
     75 [AC_MSG_RESULT(no)])
    5876
    5977ac_cv_have_getopt_long="no"
     
    7492AC_SUBST(DL_LIBS)
    7593
    76 # Optimizations
    77 CFLAGS="${CFLAGS} -g -O2"
    78 # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    79 CFLAGS="${CFLAGS} -Wall -W -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
    80 
    8194AC_OUTPUT([
    8295  Makefile
Note: See TracChangeset for help on using the changeset viewer.