respect CFLAGS

This commit is contained in:
wilfried 2001-03-12 16:21:17 +00:00
parent 97e1ae70ad
commit 8c645ed13a
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-Configure,v 1.1 2001/03/12 16:21:17 wilfried Exp $
--- Configure.orig Fri Jan 20 21:45:50 1995
+++ Configure Mon Mar 12 17:20:26 2001
@@ -3,7 +3,6 @@
# Script to auto-configure splitvt. -Sam Lantinga
QUIET="-v"
-CFLAGS=
MAKE="echo \"Done. Type 'make' to build\""
echo "Making configuration..."
@@ -25,7 +24,7 @@ done
cc $CFLAGS -o config config.c
if [ -f config ]; then
- if ./config $QUIET
+ if env CFLAGS="$CFLAGS" ./config $QUIET
then eval $MAKE
fi
else

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-config_c,v 1.1 2001/03/12 16:21:17 wilfried Exp $
--- config.c.orig Fri Jan 20 21:45:51 1995
+++ config.c Mon Mar 12 17:21:35 2001
@@ -2,6 +2,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <signal.h>
+#include <stdlib.h>
/*#define DEBUG /* Provides extra debugging info */
@@ -64,6 +65,7 @@ char *argv[];
#else
cflags[0]='\0';
#endif
+ strcpy(cflags,getenv("CFLAGS"));
ldflags[0]='\0';
#define INCLUDE "/usr/include/"
@@ -90,8 +92,6 @@ char *argv[];
solaris=1;
VERBOSE_PRINT("\tI see you are running Solaris.\n");
}
- else
- strcat(cflags, " -O");
/* Check for IRIX */
if ( grep("/usr/include", "unistd.h", "_getpty") )