$NetBSD: patch-aa,v 1.4 2003/04/18 08:07:51 salo Exp $

--- c_stuff/Makefile.PL.orig	2002-04-18 11:44:20.000000000 +0200
+++ c_stuff/Makefile.PL	2003-04-18 09:57:58.000000000 +0200
@@ -34,7 +34,7 @@
 ccompile('#include <SDL/SDL.h>
           #include <SDL/SDL_mixer.h>',
 	 '',
-	 `sdl-config --cflags`,
+	 chomp_($ENV{CFLAGS} . ' ' . `sdl-config --cflags`),
 	 chomp_(`sdl-config --libs`) . ' -lSDL_mixer')
   or
   die_ 'SDL_mixer is needed (and, by the way, version >= 1.2.2 will be needed)';
@@ -43,7 +43,7 @@
 ccompile('#include <SDL/SDL.h>
           #include <SDL/SDL_mixer.h>',
 	 'Mix_FadeInMusicPos(NULL, 0, 0, 0);',
-	 `sdl-config --cflags`,
+	 chomp_($ENV{CFLAGS} . ' ' . `sdl-config --cflags`),
 	 chomp_(`sdl-config --libs`) . ' -lSDL_mixer')
   or
   die_ 'SDL_mixer >= 1.2.2 is needed (function Mix_FadeInMusicPos is missing)';
@@ -55,6 +55,6 @@
     'VERSION_FROM' => 'fb_c_stuff.pm', # finds VERSION
     'OBJECT'       => 'fb_c_stuff.o',
     'INC'          => chomp_(`sdl-config --cflags`) . ' -I.',
-    'OPTIMIZE'     => '-O2 -Wall',
+    'OPTIMIZE'     => chomp_($ENV{CFLAGS} . ' -O2 -Wall'),
     'MAKEFILE'     => 'Makefile_c',
 );
