📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.
AC_INIT(base64.c)
AM_CONFIG_HEADER(uclconf.h:config.h.in)
AM_INIT_AUTOMAKE(uclrtp, 1.2.8)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
AC_PROG_LIBTOOL
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 that <inttypes.h> exists 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 <stdint.h>, just to be difficult...
AC_CACHE_CHECK(for uint8_t in <stdint.h>, 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 <stdint.h>, 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 <stdint.h>, 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_CHECK_FUNCS(inet_pton inet_ntop)
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 <netdb.h>, 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 <netdb.h>, 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 <netinet6/in6.h>
#else
#include <netinet/in.h>
#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 -Wmissing-declarations -Werror"
fi
###############################################################################
# Done, create the output files....
AC_OUTPUT(Makefile win32/Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -