www.pudn.com > common-1.2.8.zip > configure.in
dnl Process this file with autoconf to produce a configure script. AC_INIT(src/base64.c) AC_CANONICAL_HOST AC_PROG_CC AC_PROG_CPP AC_PROG_RANLIB AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(sys/time.h) if test "$ac_cv_header_sys_time_h" = "yes"; then AC_HEADER_TIME fi AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_HEADERS(stropts.h sys/filio.h) AC_CHECK_HEADERS(stdint.h inttypes.h) ############################################################################### # Check for standard size types. The defaults are only valid on some # systems so we hope thatexists when they're wrong. AC_CHECK_TYPE(int8_t, signed char) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(int64_t, long long) # Some systems have these in , just to be difficult... AC_CACHE_CHECK(for uint8_t in , ucl_cv_uint8_t_in_stdint_h, AC_EGREP_HEADER(uint8_t, stdint.h, ucl_cv_uint8_t_in_stdint_h=yes, ucl_cv_uint8_t_in_stdint_h=no)) if test $ucl_cv_uint8_t_in_stdint_h = "no" then AC_CHECK_TYPE(uint8_t, unsigned char) fi AC_CACHE_CHECK(for uint16_t in , ucl_cv_uint16_t_in_stdint_h, AC_EGREP_HEADER(uint16_t, stdint.h, ucl_cv_uint16_t_in_stdint_h=yes, ucl_cv_uint16_t_in_stdint_h=no)) if test $ucl_cv_uint16_t_in_stdint_h = "no" then AC_CHECK_TYPE(uint16_t, unsigned short) fi AC_CACHE_CHECK(for uint32_t in , ucl_cv_uint32_t_in_stdint_h, AC_EGREP_HEADER(uint32_t, stdint.h, ucl_cv_uint32_t_in_stdint_h=yes, ucl_cv_uint32_t_in_stdint_h=no)) if test $ucl_cv_uint32_t_in_stdint_h = "no" then AC_CHECK_TYPE(uint32_t, unsigned int) fi ############################################################################### # The following two macros cause autoconf to complain. AC_C_BIGENDIAN AC_C_CHAR_UNSIGNED # # Some of the codecs in rat don't with with unsigned characters. # Force the compiler to use signed chars, to be consistent. if test $ac_cv_c_char_unsigned = yes then if test "$GCC" = yes then CFLAGS="$CFLAGS -fsigned-char" else case "$host_os" in # I don't know when "-signed" was added to IRIX CC # so err on the side of using it. irix*) CFLAGS="$CFLAGS -signed" ;; # need e.g. --force-signed-chars=-signed *) AC_MSG_ERROR([I don't know how to force signed chars]) ;; esac fi fi # __CHAR_UNSIGNED__ will be defined; hope this is OK. ############################################################################### # The following causes autoconf to complain. AC_CHECK_FILE(/dev/urandom,AC_DEFINE(HAVE_DEV_URANDOM)) # If more files than mbus.c use vsnprintf, split it out into # vsnprintf.c and add it to AC_REPLACE_FUNCS # AC_CHECK_FUNC(vsnprintf,,AC_DEFINE(NEED_VSNPRINTF)) AC_REPLACE_FUNCS(vsnprintf) ############################################################################### # If inet_aton is actually needed somewhere, split it out into # inet_aton.c and add it to AC_REPLACE_FUNCS # # AC_CHECK_FUNC succeeds on our IRIX 6.2 boxes, but it is not # declared anywhere, use egrep header to check (ugh lame, but works) AC_CACHE_CHECK(for inet_pton in , ucl_cv_inet_pton_in_inet_h, AC_EGREP_HEADER(uint16_t, stdint.h, ucl_cv_inet_pton_in_inet_h=yes, ucl_cv_inet_pton_in_inet_h=no)) if test $ucl_cv_inet_pton_in_inet_h = "no" then AC_DEFINE(NEED_INET_PTON) LIBOBJS="$LIBOBJS inet_pton.o" fi AC_CACHE_CHECK(for inet_ntop in , ucl_cv_inet_ntop_in_inet_h, AC_EGREP_HEADER(uint16_t, stdint.h, ucl_cv_inet_ntop_in_inet_h=yes, ucl_cv_inet_ntop_in_inet_h=no)) if test $ucl_cv_inet_ntop_in_inet_h = "no" then AC_DEFINE(NEED_INET_NTOP) LIBOBJS="$LIBOBJS inet_ntop.o" fi AC_SUBST(LIBOBJS) dnl AC_REPLACE_FUNCS(inet_pton inet_ntop) AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(inet_addr, nsl) ############################################################################### # -profile AC_ARG_ENABLE(profile, [ --enable-profile enable profiling], [if test $enableval = yes then if test "$GCC" = yes then CFLAGS="$CFLAGS -pg" else AC_ERROR([Don't know how to enable profiling for $CC]) fi fi]) # -bounds # add -fbounds-checking to CFLAGS # add -lcheck to LIBS AC_ARG_ENABLE(bounds, [ --enable-bounds enable bounds checking], [if test $enableval = yes then if test "$GCC" = yes then CFLAGS="$CFLAGS -fbounds-checking" LIBS="$LIBS -lcheck" else AC_ERROR([Don't know how to enable profiling for $CC]) fi fi]) # -DDEBUG # -DDEBUG_MEM # -DNDEBUG AC_ARG_ENABLE(debug, [ --enable-debug enable debug messages and code], [if test $enableval = yes then AC_DEFINE(DEBUG) fi]) AC_ARG_ENABLE(debug-mem, [ --enable-debug-mem enable memory debugging code], [if test $enableval = yes then AC_DEFINE(DEBUG_MEM) fi]) ############################################################################### # IPv6 related configuration options AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable ipv6], AC_DEFINE(HAVE_IPv6)) AC_ARG_ENABLE(kame-ipv6, [ --enable-kame-ipv6 enable kame implementation of ipv6], [ AC_DEFINE(HAVE_IPv6) LIBS="$LIBS -L/usr/local/v6/lib -linet6" ]) # Test below are IPv6 specific. Their result has no bearing if HAVE_IPv6 is # not defined. They are kept outside IPv6 enable check to keep code readable. AC_CACHE_CHECK(for getipnodebyname in , ucl_cv_getipnodebyname_in_netdb_h, AC_EGREP_HEADER(getipnodebyname, netdb.h, ucl_cv_getipnodebyname_in_netdb_h=yes, ucl_cv_getipnodebyname_in_netdb_h=no)) if test $ucl_cv_getipnodebyname_in_netdb_h then AC_DEFINE(HAVE_GETIPNODEBYNAME) fi AC_CHECK_HEADERS(netinet6/in6.h) AC_CACHE_CHECK(for struct addrinfo in , ucl_cv_st_addrinfo_in_netdb_h, AC_EGREP_HEADER(addrinfo, netdb.h, ucl_cv_st_addrinfo_in_netdb_h=yes, ucl_cv_st_addrinfo_in_netdb_h=no)) if test $ucl_cv_st_addrinfo_in_netdb_h then AC_DEFINE(HAVE_ST_ADDRINFO) fi AC_CACHE_CHECK(for sin6_len in struct sockaddr_in6, ucl_cv_sin6_len, [AC_TRY_COMPILE([ #ifdef HAVE_NETINET6_IN6_H #include #else #include #endif /* HAVE_NETINET_IN6_H */ ],[ struct sockaddr_in6 s_in; s_in.sin6_len = 0; ], ucl_cv_sin6_len=yes, ucl_cv_sin6_len=no )]) if test $ucl_cv_sin6_len = yes then AC_DEFINE(HAVE_SIN6_LEN) fi ############################################################################### # Check whether gtk-doc is installed AC_CHECK_PROG(GTKDOC, gtkdoc-scan, yes, no, $PATH) if test "$GTKDOC" = yes then OPTDOC=doc else OPTDOC= fi AC_SUBST(OPTDOC) ############################################################################### # GCC-specific warning flags if test "$GCC" = yes then CFLAGS="$CFLAGS -W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual -Wmissing-declarations -Werror" fi ############################################################################### # Done, create the output files.... AC_CONFIG_HEADER(src/uclconf.h:src/config.h.in) AC_OUTPUT(Makefile doc/Makefile examples/Makefile examples/rtp/Makefile src/Makefile tests/Makefile)