📄 configure
字号:
ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lnsl $LIBS"else echo "$ac_t""no" 1>&6# Some strange OSes (SINIX) have it in libsocket: echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6echo "configure:1790: checking for gethostbyname in -lsocket" >&5ac_lib_var=`echo socket'_'gethostbyname'_' | sed 'y%./+- %__p__%'`if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lsocket $LIBS"cat > conftest.$ac_ext <<EOF#line 1798 "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 gethostbyname();int main() {gethostbyname(); return 0; }EOFif { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lsocket $LIBS"else echo "$ac_t""no" 1>&6# Unfortunately libsocket sometimes depends on libnsl. # AC_CHECK_LIB's API is essentially broken so the # following ugliness is necessary: echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6echo "configure:1838: checking for gethostbyname in -lsocket" >&5ac_lib_var=`echo socket'_'gethostbyname'_'-lnsl | sed 'y%./+- %__p__%'`if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lsocket -lnsl $LIBS"cat > conftest.$ac_ext <<EOF#line 1846 "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 gethostbyname();int main() {gethostbyname(); return 0; }EOFif { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lsocket -lnsl $LIBS"else echo "$ac_t""no" 1>&6echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6echo "configure:1876: checking for gethostbyname in -lresolv" >&5ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lresolv $LIBS"cat > conftest.$ac_ext <<EOF#line 1884 "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 gethostbyname();int main() {gethostbyname(); return 0; }EOFif { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lresolv $LIBS"else echo "$ac_t""no" 1>&6fififififi echo $ac_n "checking for socket""... $ac_c" 1>&6echo "configure:1931: checking for socket" >&5if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1936 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); 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 socket();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_socket) || defined (__stub___socket)choke me#elsesocket();#endif; return 0; }EOFif { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_socket=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 :else echo "$ac_t""no" 1>&6echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6echo "configure:1977: checking for socket in -lsocket" >&5ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lsocket $LIBS"cat > conftest.$ac_ext <<EOF#line 1985 "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; }EOFif { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lsocket $LIBS"else echo "$ac_t""no" 1>&6echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6echo "configure:2022: checking for socket in -lsocket" >&5ac_lib_var=`echo socket'_'socket'_'-lnsl | sed 'y%./+- %__p__%'`if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lsocket -lnsl $LIBS"cat > conftest.$ac_ext <<EOF#line 2030 "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; }EOFif { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lbl_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lsocket -lnsl $LIBS"else echo "$ac_t""no" 1>&6fififi # DLPI needs putmsg under HPUX so test for -lstr while we're at it echo $ac_n "checking for putmsg in -lstr""... $ac_c" 1>&6echo "configure:2067: checking for putmsg in -lstr" >&5ac_lib_var=`echo str'_'putmsg | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lstr $LIBS"cat > conftest.$ac_ext <<EOF#line 2075 "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 putmsg();int main() {putmsg(); return 0; }EOFif { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo str | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lstr $LIBS"else echo "$ac_t""no" 1>&6fi LBL_LIBS="$LIBS" pfopen=/usr/examples/packetfilter/pfopen.c if test -f $pfopen ; then for ac_func in pfopendoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:2121: checking for $ac_func" >&5if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2126 "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; }EOFif { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*fiif 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 1EOF else echo "$ac_t""no" 1>&6fidone if test $ac_cv_func_pfopen = "no" ; then echo "$ac_t""Using $pfopen" 1>&6 LIBS="$LIBS $pfopen" fi fi echo $ac_n "checking for local pcap library""... $ac_c" 1>&6echo "configure:2179: checking for local pcap library" >&5 libpcap=FAIL lastdir=FAIL places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \ egrep '/libpcap-[0-9]*\.[0-9]*(\.[0-9]*)?([ab][0-9]*)?$'` for dir in $places ../libpcap libpcap ; do basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'` if test $lastdir = $basedir ; then continue; fi lastdir=$dir if test -r $dir/pcap.c ; then libpcap=$dir/libpcap.a d=$dir fi done if test $libpcap = FAIL ; then echo "$ac_t""not found" 1>&6 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6echo "configure:2198: checking for main in -lpcap" >&5ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lpcap $LIBS"cat > conftest.$ac_ext <<EOF#line 2206 "configure"#include "confdefs.h"int main() {main(); return 0; }EOFif { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftes
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -