diff options
Diffstat (limited to 'lib/make/configure')
-rwxr-xr-x | lib/make/configure | 78 |
1 files changed, 64 insertions, 14 deletions
diff --git a/lib/make/configure b/lib/make/configure index 8589dd31..d5cf26e4 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -3366,16 +3366,66 @@ else echo "$ac_t""no" 1>&6 fi +# Check if someone has defined SOCKET +echo $ac_n "checking if SOCKET is defined""... $ac_c" 1>&6 +echo "configure:3372: checking if SOCKET is defined" >&5 +if eval "test \"`echo '$''{'cctk_cv_have_SOCKET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3377 "configure" +#include "confdefs.h" +#include <stdio.h> +#include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif +int main() { +SOCKET foo; return 0 +; return 0; } +EOF +if { (eval echo configure:3397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "cctk_cv_have_SOCKET=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "cctk_cv_have_SOCKET=no" +fi +rm -f conftest* + +fi + +if test "$cctk_cv_have_SOCKET" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKET_TYPE 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + # Do we have gethostbyname for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3374: checking for $ac_func" >&5 +echo "configure:3424: 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 3379 "configure" +#line 3429 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3398,7 +3448,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3452: \"$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 @@ -3438,12 +3488,12 @@ cross_compiling=$ac_cv_prog_cxx_cross do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3442: checking for $cctk_hdr" >&5 +echo "configure:3492: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3447 "configure" +#line 3497 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3451,7 +3501,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3491,14 +3541,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <<EOF -#line 3495 "configure" +#line 3545 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:3502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_BOOL 1 @@ -3523,12 +3573,12 @@ fi for ac_func in getopt_long_only do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3527: checking for $ac_func" >&5 +echo "configure:3577: 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 3532 "configure" +#line 3582 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3551,7 +3601,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3605: \"$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 @@ -3596,12 +3646,12 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3600: checking for $ac_func" >&5 +echo "configure:3650: 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 3605 "configure" +#line 3655 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3624,7 +3674,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3678: \"$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 |