openbsd-ports/devel/silc-toolkit/patches/patch-configure_ac
2009-08-11 21:17:21 +00:00

94 lines
2.4 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.4 2009/08/11 21:17:21 sthen Exp $
--- configure.ac.orig Fri Aug 7 07:51:30 2009
+++ configure.ac Tue Aug 11 14:46:10 2009
@@ -97,9 +97,6 @@ AM_CONDITIONAL(SILC_X86_64, test x$cpu_x86_64 = xtrue)
AM_CONDITIONAL(SILC_POWERPC, test x$cpu_ppc = xtrue)
AM_CONDITIONAL(SILC_IA64, test x$cpu_ia64 = xtrue)
-# Control compiler optimizations
-CFLAGS=`echo $CFLAGS | sed 's/-O[ 0123456789s]*//g'`
-
AC_PROG_CC
AC_C_INLINE
AC_C_CONST
@@ -490,59 +487,9 @@ fi
## Compiler and compiler flag checks
##
-if test "$GCC"; then
- # GCC specific options
- if test "x$summary_debug" = "xyes"; then
- SILC_ADD_CFLAGS(-g)
- else
- SILC_ADD_CFLAGS(-g)
- fi
- SILC_ADD_CFLAGS(-Wall -finline-functions)
- SILC_ADD_CFLAGS(-Wno-pointer-sign)
-else
- # Other compilers
- case "$target" in
- alpha*-dec-osf*)
- SILC_ADD_CFLAGS(-g3)
- ;;
- mips*-sgi-irix*)
- SILC_ADD_CFLAGS(-g3)
- ;;
- *)
- SILC_ADD_CFLAGS(-g)
- ;;
- esac
+SILC_ADD_CFLAGS(-Wall -finline-functions)
+SILC_ADD_CFLAGS(-Wno-pointer-sign)
- # Intel C++ Compiler needs -restrict
- if test "x$CC" = "xicc"; then
- SILC_ADD_CFLAGS(-restrict)
- fi
-fi
-
-if test x$want_cc_optimizations = xtrue; then
- if test "$GCC"; then
- # GCC specific options
- if test "x$summary_debug" = "xyes"; then
- SILC_ADD_CFLAGS(-O)
- else
- SILC_ADD_CFLAGS(-O2)
- fi
- else
- # Other compilers
- case "$target" in
- alpha*-dec-osf*)
- SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
- ;;
- mips*-sgi-irix*)
- SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
- ;;
- *)
- SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
- ;;
- esac
- fi
-fi
-
#
# Workaround a bug in GCC 2.x which causes memory exhaustion
# when compiling sha1 with optimizations on UltraSPARC.
@@ -1013,7 +960,7 @@ if test x$check_threads = xtrue; then
AC_MSG_RESULT(yes)
AC_CHECK_HEADERS(pthread.h,
[
- LIBS="$LIBS -lpthread"
+ LIBS="$LIBS -pthread"
AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
[
# FreeBSD
@@ -1047,7 +994,7 @@ if test x$check_threads = xtrue; then
AC_CHECK_HEADERS(pthread.h,
[
- LIBS="$LIBS -lpthread"
+ LIBS="$LIBS -pthread"
AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
[
has_threads=false