8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Changes to detect socklen_t properly, and a bit more on install

This commit is contained in:
skywalker 2001-08-14 17:41:39 +00:00
parent 5df7da6266
commit d8dd574545
4 changed files with 44 additions and 143 deletions

167
configure vendored
View File

@ -2030,153 +2030,44 @@ fi
done done
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 #AC_CHECK_TYPE(socklen_t, int)
echo "configure:2035: checking for ANSI C header files" >&5 echo $ac_n "checking Checking for socklen_t type""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo "configure:2036: checking Checking for socklen_t type" >&5
echo $ac_n "(cached) $ac_c" 1>&6 cat > conftest.$ac_ext <<EOF
else #line 2038 "configure"
cat > conftest.$ac_ext <<EOF
#line 2040 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2065 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "memchr" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2083 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "free" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 2104 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_header_stdc=no
fi
rm -fr conftest*
fi
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
fi
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
echo "configure:2139: checking for socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2144 "configure"
#include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #include <sys/socket.h>
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_socklen_t=yes
else
rm -rf conftest*
ac_cv_type_socklen_t=no
fi
rm -f conftest*
fi int main() {
echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 socklen_t a;
if test $ac_cv_type_socklen_t = no; then ; return 0; }
EOF
if { (eval echo configure:2048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define socklen_t int #define socklen_t int
EOF EOF
echo "$ac_t""no" 1>&6
fi fi
rm -f conftest*
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:2173: checking whether byte ordering is bigendian" >&5 echo "configure:2064: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_c_bigendian=unknown ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro. # See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2180 "configure" #line 2071 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
@ -2187,11 +2078,11 @@ int main() {
#endif #endif
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not. # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2195 "configure" #line 2086 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
@ -2202,7 +2093,7 @@ int main() {
#endif #endif
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_bigendian=yes ac_cv_c_bigendian=yes
else else
@ -2222,7 +2113,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2226 "configure" #line 2117 "configure"
#include "confdefs.h" #include "confdefs.h"
main () { main () {
/* Are we little or big endian? From Harbison&Steele. */ /* Are we little or big endian? From Harbison&Steele. */
@ -2235,7 +2126,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1); exit (u.c[sizeof (long) - 1] == 1);
} }
EOF EOF
if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_c_bigendian=no ac_cv_c_bigendian=no
else else
@ -2259,12 +2150,12 @@ EOF
fi fi
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2263: checking for working const" >&5 echo "configure:2154: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2268 "configure" #line 2159 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@ -2313,7 +2204,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else

View File

@ -33,7 +33,16 @@ AC_CHECK_HEADERS(ctype.h)
AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(signal.h) AC_CHECK_HEADERS(signal.h)
AC_CHECK_TYPE(socklen_t, int) #AC_CHECK_TYPE(socklen_t, int)
AC_MSG_CHECKING(Checking for socklen_t type)
AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
],
[socklen_t a;],
[AC_MSG_RESULT(yes)],
[AC_DEFINE(socklen_t, int) AC_MSG_RESULT(no)])
AC_C_BIGENDIAN AC_C_BIGENDIAN
AC_C_CONST AC_C_CONST

View File

@ -26,7 +26,7 @@
# Contributor(s): # Contributor(s):
# #
# #
# $Id: Makefile.in,v 1.3 2001-08-13 08:14:38 skywalker Exp $ # $Id: Makefile.in,v 1.4 2001-08-14 17:41:39 skywalker Exp $
# #
ROOT=../.. ROOT=../..
@ -82,7 +82,8 @@ package : @FIREBIRD_ARCH_TYPE@packages
runclassicinstall: $(LastClassicInstallFlg) runclassicinstall: $(LastClassicInstallFlg)
$(LastClassicInstallFlg) : $(BIN)/gsec $(LastClassicInstallFlg) : $(BIN)/gsec
sh $(InstallRoot)/classic/CSTarInstall.sh (cd $(ROOT); sh src/install/classic/CSTarInstall.sh)
# (cd $(ROOT); sh $(InstallRoot)/classic/CSTarInstall.sh)
touch $(LastClassicInstallFlg) touch $(LastClassicInstallFlg)

View File

@ -26,7 +26,7 @@
# Contributor(s): # Contributor(s):
# #
# #
# $Id: make.rules,v 1.6 2001-08-13 08:14:38 skywalker Exp $ # $Id: make.rules,v 1.7 2001-08-14 17:41:39 skywalker Exp $
# #
#____________________________________________________________________________ #____________________________________________________________________________
@ -79,7 +79,7 @@ export FIREBIRD
# I would like to remove this one. # I would like to remove this one.
SOURCE=$(ROOT)/src SOURCE=$(ROOT)/src
CFLAGS:= $(CFLAGS) -g -pipe -MMD -p -fPIC -I$(ROOT)/src -I$(ROOT)/src/include CFLAGS:= $(CFLAGS) -g -pipe -MMD -p -fPIC -Wall -I$(ROOT)/src -I$(ROOT)/src/include
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS) CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)