summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-15 14:56:07 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-15 14:56:07 +0000
commit2e23003cd75586bb76d9b7036348392f7700055b (patch)
tree7a8f4df325e4db8a803e8fff43218897aeccbfd0
parentb74166b24be492a0a1a39297008f1ac5f67ee6f6 (diff)
Checking for another header for the network stuff.
Preliminary check for crypt(3). Only tries the standard library so far. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1817 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/make/cctk_Config.h.in2
-rwxr-xr-xlib/make/configure126
-rw-r--r--lib/make/configure.in5
3 files changed, 118 insertions, 15 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index a0c2bd9d..f4be322e 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -77,6 +77,7 @@
#undef HAVE_MKDIR
#undef HAVE_SCANDIR
#undef HAVE_GETOPT_LONG_ONLY
+#undef HAVE_CRYPT
/* Do we have mode_t ? */
@@ -97,6 +98,7 @@
#undef HAVE_REGEX_H
#undef HAVE_SYS_TYPES_H
#undef HAVE_SYS_SOCKET_H
+#undef HAVE_NETINET_IN_H
#undef HAVE_WINSOCK2_H
#undef TIME_WITH_SYS_TIME
diff --git a/lib/make/configure b/lib/make/configure
index 98d71e2d..0a764aa5 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -3074,7 +3074,7 @@ else
fi
done
-for cctk_hdr in winsock2.h
+for cctk_hdr in netinet/in.h
do
cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6
@@ -3113,14 +3113,53 @@ else
fi
done
+for cctk_hdr in winsock2.h
+do
+cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6
+echo "configure:3121: 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 3126 "configure"
+#include "confdefs.h"
+#include <$cctk_hdr>
+int main() {
+return 0;
+; return 0; }
+EOF
+if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "cctk_cv_header_$cctk_safe=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "cctk_cv_header_$cctk_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$cctk_cv_header_'$cctk_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cctk_tr_hdr=HAVE_`echo $cctk_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $cctk_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3119: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3158: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3124 "configure"
+#line 3163 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -3129,7 +3168,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -3154,12 +3193,12 @@ fi
# Check if we have socklen_t available
echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6
-echo "configure:3158: checking if socklen_t is defined" >&5
+echo "configure:3197: checking if socklen_t is defined" >&5
if eval "test \"`echo '$''{'cctk_cv_have_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3163 "configure"
+#line 3202 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
@@ -3179,7 +3218,7 @@ int main() {
socklen_t foo; return 0
; return 0; }
EOF
-if { (eval echo configure:3183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "cctk_cv_have_socklen_t=yes"
else
@@ -3218,19 +3257,19 @@ 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:3222: checking for $cctk_hdr" >&5
+echo "configure:3261: 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 3227 "configure"
+#line 3266 "configure"
#include "confdefs.h"
#include <$cctk_hdr>
int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "cctk_cv_header_$cctk_safe=yes"
else
@@ -3270,14 +3309,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 3274 "configure"
+#line 3313 "configure"
#include "confdefs.h"
int main() {
bool foo;
; return 0; }
EOF
-if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_BOOL 1
@@ -3302,12 +3341,12 @@ fi
for ac_func in getopt_long_only
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3306: checking for $ac_func" >&5
+echo "configure:3345: 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 3311 "configure"
+#line 3350 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3330,7 +3369,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3373: \"$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
@@ -3372,6 +3411,63 @@ else
fi
+for ac_func in crypt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3418: 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 3423 "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:3446: \"$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
+fi
+done
+
+
+
diff --git a/lib/make/configure.in b/lib/make/configure.in
index cc4e299d..73622574 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -384,6 +384,7 @@ CCTK_CHECK_HEADERS(getopt.h)
CCTK_HEADER_REGEX
CCTK_CHECK_HEADERS(sys/types.h)
CCTK_CHECK_HEADERS(sys/socket.h)
+CCTK_CHECK_HEADERS(netinet/in.h)
CCTK_CHECK_HEADERS(winsock2.h)
AC_HEADER_TIME
@@ -457,6 +458,10 @@ else
BUILD_REGEX=yes
fi
+dnl Do we have crypt(3)
+
+AC_CHECK_FUNCS(crypt)
+
AC_SUBST(LIBDIRS)
AC_SUBST(PACKAGE_DIR)