⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 UCL Common Code Library Routines common to a number of multimedia tools. The library originates
💻
📖 第 1 页 / 共 5 页
字号:
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  cat >> confdefs.h <<\EOF
#define __CHAR_UNSIGNED__ 1
EOF

fi

#
# 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
		*)	{ echo "configure: error: I don't know how to force signed chars" 1>&2; exit 1; }
			;;
		esac
	fi
fi
#  __CHAR_UNSIGNED__ will be defined; hope this is OK.

###############################################################################
# The following causes autoconf to complain.

ac_safe=`echo "/dev/urandom" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /dev/urandom""... $ac_c" 1>&6
echo "configure:1828: checking for /dev/urandom" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r /dev/urandom; then
    eval "ac_cv_file_$ac_safe=yes"
  else
    eval "ac_cv_file_$ac_safe=no"
  fi
fi
fi
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DEV_URANDOM 1
EOF

else
  echo "$ac_t""no" 1>&6

fi


# 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))
for ac_func in vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1860: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1865 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



###############################################################################
# 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)

echo $ac_n "checking for inet_pton in <arpa/inet.h>""... $ac_c" 1>&6
echo "configure:1923: checking for inet_pton in <arpa/inet.h>" >&5
if eval "test \"`echo '$''{'ucl_cv_inet_pton_in_inet_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1928 "configure"
#include "confdefs.h"
#include <stdint.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uint16_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ucl_cv_inet_pton_in_inet_h=yes
else
  rm -rf conftest*
  ucl_cv_inet_pton_in_inet_h=no
fi
rm -f conftest*

fi

echo "$ac_t""$ucl_cv_inet_pton_in_inet_h" 1>&6
if test $ucl_cv_inet_pton_in_inet_h = "no"
then
	cat >> confdefs.h <<\EOF
#define NEED_INET_PTON 1
EOF

	LIBOBJS="$LIBOBJS inet_pton.o"
fi
echo $ac_n "checking for inet_ntop in <arpa/inet.h>""... $ac_c" 1>&6
echo "configure:1954: checking for inet_ntop in <arpa/inet.h>" >&5
if eval "test \"`echo '$''{'ucl_cv_inet_ntop_in_inet_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1959 "configure"
#include "confdefs.h"
#include <stdint.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uint16_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ucl_cv_inet_ntop_in_inet_h=yes
else
  rm -rf conftest*
  ucl_cv_inet_ntop_in_inet_h=no
fi
rm -f conftest*

fi

echo "$ac_t""$ucl_cv_inet_ntop_in_inet_h" 1>&6
if test $ucl_cv_inet_ntop_in_inet_h = "no"
then
	cat >> confdefs.h <<\EOF
#define NEED_INET_NTOP 1
EOF

	LIBOBJS="$LIBOBJS inet_ntop.o"
else
	cat >> confdefs.h <<\EOF
#define HAVE_INET_NTOP 1
EOF

fi




echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
echo "configure:1994: checking for library containing socket" >&5
if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_socket="no"
cat > conftest.$ac_ext <<EOF
#line 2001 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_socket="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_socket" = "no" && for i in socket; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 2023 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_socket="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_socket" 1>&6
if test "$ac_cv_search_socket" != "no"; then
  test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
  
else :
  
fi

echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
echo "configure:2056: checking for library containing inet_addr" >&5
if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_inet_addr="no"
cat > conftest.$ac_ext <<EOF
#line 2063 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char inet_addr();

int main() {
inet_addr()
; return 0; }
EOF
if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_inet_addr="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_inet_addr" = "no" && for i in nsl; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 2085 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char inet_addr();

int main() {
inet_addr()
; return 0; }
EOF
if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_inet_addr="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
if test "$ac_cv_search_inet_addr" != "no"; then
  test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
  
else :
  
fi

###############################################################################
#  -profile
# Check whether --enable-profile or --disable-profile was given.
if test "${enable_profile+set}" = set; then
  enableval="$enable_profile"
  if test $enableval = yes
	then
		if test "$GCC" = yes
		then
			CFLAGS="$CFLAGS -pg"
		else
			{ echo "configure: error: Don't know how to enable profiling for $CC" 1>&2; exit 1; }
		fi
	fi
fi


#  -bounds
#       add -fbounds-checking to CFLAGS
#       add -lcheck to LIBS
# Check whether --enable-bounds or --disable-bounds was given.
if test "${enable_bounds+set}" = set; then
  enableval="$enable_bounds"
  if test $enableval = yes
	then
		if test "$GCC" = yes
		then
			CFLAGS="$CFLAGS -fbounds-checking"
			LIBS="$LIBS -lcheck"
		else
			{ echo "configure: error: Don't know how to enable profiling for $CC" 1>&2; exit 1; }
		fi
	fi
fi


# -DDEBUG
# -DDEBUG_MEM
# -DNDEBUG
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  if test $enableval = yes
	then
		cat >> confdefs.h <<\EOF
#define DEBUG 1
EOF

	fi
fi

# Check whether --enable-debug-mem or --disable-debug-mem was given.
if test "${enable_debug_mem+set}" = set; then
  enableval="$enable_debug_mem"
  if test $enableval = yes
	then
		cat >> confdefs.h <<\EOF
#define DEBUG_MEM 1
EOF

	fi
fi


###############################################################################
# IPv6 related configuration options (using tcpdump's configure.in)
echo $ac_n "checking whether to enable IPv6""... $ac_c" 1>&6
echo "configure:2184: checking whether to enable IPv6" >&5
# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
  enableval="$enable_ipv6"
   case "$enableval" in
	  yes)	echo "$ac_t""yes" 1>&6
		cat >> confdefs.h <<\EOF
#define HAVE_IPv6 1
EOF

		ipv6=yes
		;;
	  *)	echo "$ac_t""no" 1>&6
		ipv6=no
		;;
	  esac
	
else
   echo "$ac_t""no" 1>&6
	  ipv6=no
	
fi

ipv6type=unknown
ipv6lib=none
ipv6trylibc=no

# IPv6 Stack Type Detector
if test "$ipv6" = "yes"; then
	echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
echo "configure:2214: checking ipv6 stack type" >&5
	for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
		case $i in
		inria)
						cat > conftest.$ac_ext <<EOF
#line 2219 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
				CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*

			;;
		kame)
						cat > conftest.$ac_ext <<EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -