Remove whitespace.
[coreboot.git] / util / mkelfImage / configure.ac
index 652b952de4a3eff910c4a64ba81ed322a4affbc4..af0fe19aaaa8b2d6604942b5964d4641069b4a20 100644 (file)
@@ -1,7 +1,7 @@
-dnl 
+dnl
 dnl configure.ac for mkelfImage
-dnl 
-dnl 
+dnl
+dnl
 
 dnl ---Required
 AC_INIT(Makefile.conf.in)
@@ -16,11 +16,11 @@ AC_CANONICAL_HOST
 
 
 dnl Compute target cpu
-case $host_cpu in 
-       i?86 )  
+case $host_cpu in
+       i?86 )
                target_cpu="i386"
                ;;
-       * ) 
+       * )
                target_cpu="$host_cpu"
                ;;
 esac
@@ -111,7 +111,7 @@ if test "$with_i386" != "no" ; then
        fi
        AC_CHECK_PROG([I386_CC], [$cc], [$cc], [""], [$PATH])
        if test "$I386_CC" = no; then
-          
+
                AC_MSG_ERROR([$cc not found])
        fi
        AC_CHECK_PROG([I386_CPP], [$cpp], [$cpp], [""], [$PATH])
@@ -148,7 +148,7 @@ if test "$with_ia64" != "no" ; then
        fi
        AC_CHECK_PROG([IA64_CC], [$cc], [$cc], [""], [$PATH])
        if test "$IA64_CC" = no; then
-          
+
                AC_MSG_ERROR([$cc not found])
        fi
        AC_CHECK_PROG([IA64_CPP], [$cpp], [$cpp], [""], [$PATH])
@@ -186,6 +186,27 @@ IA64_ASFLAGS='-mconstant-gp -mauto-pic'
 IA64_LDFLAGS='-static --warn-multiple-gp --warn-common'
 
 AC_SUBST([HOST_CC])
+
+AC_CACHE_CHECK(for -fno-stack-protector, libc_cv_fno_stack_protector, [
+cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if AC_TRY_COMMAND([$I386_CC -fno-stack-protector
+                           -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+  libc_cv_fno_stack_protector=yes
+else
+  libc_cv_fno_stack_protector=no
+fi
+rm -f conftest*])
+if test $libc_cv_fno_stack_protector = yes; then
+  I386_CFLAGS="$I386_CFLAGS -fno-stack-protector"
+  IA64_CFLAGS="$IA64_CFLAGS -fno-stack-protector"
+
+fi
+AC_SUBST(libc_cv_fno_stack_protector)
+
 AC_SUBST([HOST_CFLAGS])
 
 AC_SUBST([I386_CC])