honour CFLAGS; from Brad.

This commit is contained in:
sthen 2009-08-01 19:24:07 +00:00
parent 3a028a918a
commit f6522fbd94
4 changed files with 157 additions and 12 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.24 2009/08/01 17:22:26 sthen Exp $
# $OpenBSD: Makefile,v 1.25 2009/08/01 19:24:07 sthen Exp $
COMMENT= toolkit for the development of SILC applications
DISTNAME= silc-toolkit-1.1.9
PKGNAME= ${DISTNAME}p3
PKGNAME= ${DISTNAME}p4
CATEGORIES= devel
MASTER_SITES= http://www.silcnet.org/download/toolkit/sources/

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-configure_ac,v 1.2 2009/01/26 12:04:35 ajacoutot Exp $
--- configure.ac.orig Thu Jan 8 15:29:31 2009
+++ configure.ac Mon Jan 26 11:08:04 2009
$OpenBSD: patch-configure_ac,v 1.3 2009/08/01 19:24:07 sthen Exp $
--- configure.ac.orig Thu Jan 8 09:29:31 2009
+++ configure.ac Sat Aug 1 12:09:07 2009
@@ -50,6 +50,9 @@ case "$target" in
*-*-netbsd*)
check_threads=true
@ -11,7 +11,79 @@ $OpenBSD: patch-configure_ac,v 1.2 2009/01/26 12:04:35 ajacoutot Exp $
*-*-*bsd*)
check_threads=false
;;
@@ -1010,7 +1013,7 @@ if test x$check_threads = xtrue; then
@@ -94,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
@@ -487,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.
@@ -1010,7 +960,7 @@ if test x$check_threads = xtrue; then
AC_MSG_RESULT(yes)
AC_CHECK_HEADERS(pthread.h,
[
@ -20,7 +92,7 @@ $OpenBSD: patch-configure_ac,v 1.2 2009/01/26 12:04:35 ajacoutot Exp $
AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
[
# FreeBSD
@@ -1044,7 +1047,7 @@ if test x$check_threads = xtrue; then
@@ -1044,7 +994,7 @@ if test x$check_threads = xtrue; then
AC_CHECK_HEADERS(pthread.h,
[

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.51 2009/08/01 12:58:06 sthen Exp $
# $OpenBSD: Makefile,v 1.52 2009/08/01 19:24:34 sthen Exp $
COMMENT= Secure Internet Live Conferencing (SILC) client
DISTNAME= silc-client-1.1.8
PKGNAME= ${DISTNAME}p0
CATEGORIES= net
HOMEPAGE= http://www.silcnet.org/

View File

@ -1,7 +1,79 @@
$OpenBSD: patch-configure_ac,v 1.6 2009/08/01 12:58:06 sthen Exp $
--- configure.ac.orig Sat Aug 1 05:46:13 2009
+++ configure.ac Sat Aug 1 05:46:45 2009
@@ -616,8 +616,8 @@ if test -n "$with_silc_includes" || test -n "$with_sil
$OpenBSD: patch-configure_ac,v 1.7 2009/08/01 19:24:34 sthen Exp $
--- configure.ac.orig Sat Aug 1 02:53:41 2009
+++ configure.ac Sat Aug 1 12:15:39 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
@@ -471,59 +468,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.
@@ -616,8 +563,8 @@ if test -n "$with_silc_includes" || test -n "$with_sil
else
# pkg-config check