Fixup eee build.

git-svn-id: file:///svn/unbound/trunk@1339 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-11-08 10:05:39 +00:00
parent 847107403f
commit 327e1f4b10
3 changed files with 110 additions and 27 deletions

120
configure vendored
View file

@ -4284,6 +4284,68 @@ fi
fi
# check again for GNU_SOURCE for setresgid. May fail if setresgid
# is not available at all. -D_FRSRESGID is to make this check unique.
# otherwise we would get the previous cached result.
{ echo "$as_me:$LINENO: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
echo $ECHO_N "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... $ECHO_C" >&6; }
cache=`echo -D_GNU_SOURCE -D_FRSRESGID | sed 'y%.=/+- %___p__%'`
if { as_var=cv_prog_cc_flag_needed_$cache; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo '
#include <unistd.h>
int test() {
int a = setresgid(0,0,0);
a = setresuid(0,0,0);
return a;
}
' > conftest.c
echo 'void f(){}' >>conftest.c
if test -z "`$CC $CFLAGS -Werror -Wall -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_needed_$cache=no"
else
if test -z "`$CC $CFLAGS -D_GNU_SOURCE -D_FRSRESGID -Werror -Wall -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_needed_$cache=yes"
else
eval "cv_prog_cc_flag_needed_$cache=fail"
#echo 'Test with flag fails too!'
#cat conftest.c
#echo "$CC $CFLAGS -D_GNU_SOURCE -D_FRSRESGID -Werror -Wall -c conftest.c 2>&1"
#echo `$CC $CFLAGS -D_GNU_SOURCE -D_FRSRESGID -Werror -Wall -c conftest.c`
#exit 1
fi
fi
rm -f conftest
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
:
CFLAGS="$CFLAGS -D_GNU_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
:
else
{ echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6; }
:
fi
fi
{ echo "$as_me:$LINENO: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
@ -5929,7 +5991,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5932 "configure"' > conftest.$ac_ext
echo '#line 5994 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -7243,11 +7305,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7246: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7308: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7250: \$? = $ac_status" >&5
echo "$as_me:7312: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7533,11 +7595,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7536: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7598: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7540: \$? = $ac_status" >&5
echo "$as_me:7602: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7637,11 +7699,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7640: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7702: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7644: \$? = $ac_status" >&5
echo "$as_me:7706: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -9988,7 +10050,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9991 "configure"
#line 10053 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10088,7 +10150,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10091 "configure"
#line 10153 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12508,11 +12570,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12511: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12573: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12515: \$? = $ac_status" >&5
echo "$as_me:12577: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -12612,11 +12674,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12615: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12677: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12619: \$? = $ac_status" >&5
echo "$as_me:12681: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -14176,11 +14238,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14179: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14241: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14183: \$? = $ac_status" >&5
echo "$as_me:14245: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -14280,11 +14342,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14283: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14345: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14287: \$? = $ac_status" >&5
echo "$as_me:14349: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -16469,11 +16531,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16472: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16534: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16476: \$? = $ac_status" >&5
echo "$as_me:16538: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -16759,11 +16821,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16762: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16824: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16766: \$? = $ac_status" >&5
echo "$as_me:16828: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -16863,11 +16925,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16866: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16928: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16870: \$? = $ac_status" >&5
echo "$as_me:16932: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -24243,11 +24305,13 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@ -24287,11 +24351,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}

View file

@ -277,6 +277,20 @@ int test() {
}
], [CFLAGS="$CFLAGS -D_GNU_SOURCE"])
# check again for GNU_SOURCE for setresgid. May fail if setresgid
# is not available at all. -D_FRSRESGID is to make this check unique.
# otherwise we would get the previous cached result.
CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID,
[
#include <unistd.h>
int test() {
int a = setresgid(0,0,0);
a = setresuid(0,0,0);
return a;
}
], [CFLAGS="$CFLAGS -D_GNU_SOURCE"])
CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112,
[
#include "confdefs.h"

View file

@ -1,3 +1,6 @@
8 November 2008: Wouter
- added configure check for eee build warning.
7 November 2008: Wouter
- fix bug 217: fixed, setreuid and setregid do not work on MacOSX10.4.
- detect nonblocking problems in network stack in configure script.