about summary refs log tree commit diff
path: root/buildtools
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-12-04 17:45:56 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-12-04 17:45:56 +0000
commit1d6212e788a4ae3ef06dfd80cd73ff020c34a5cd (patch)
treed17fa006f30e4a2fc15439221c6a7e66fbd86004 /buildtools
parent30eb9c5000a7299f07b72fdc87ffd3634e6ca252 (diff)
downloadnetpbm-mirror-1d6212e788a4ae3ef06dfd80cd73ff020c34a5cd.tar.gz
netpbm-mirror-1d6212e788a4ae3ef06dfd80cd73ff020c34a5cd.tar.xz
netpbm-mirror-1d6212e788a4ae3ef06dfd80cd73ff020c34a5cd.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@779 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/configure.pl44
1 files changed, 22 insertions, 22 deletions
diff --git a/buildtools/configure.pl b/buildtools/configure.pl
index 32984b7d..98570ddd 100755
--- a/buildtools/configure.pl
+++ b/buildtools/configure.pl
@@ -1240,6 +1240,26 @@ sub gnuOptimizeOpt($) {
 
 
 
+sub gnuCflags($) {
+    my ($gccCommandName) = @_;
+
+    return("CFLAGS = " . gnuOptimizeOpt($gccCommandName) . " -ffast-math " .
+           " -pedantic -fno-common " . 
+           "-Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit " .
+           "-Wwrite-strings -Wmissing-prototypes -Wundef\n");
+}
+
+
+
+sub makeCompilerGcc($) {
+    my ($config_mkR) = @_;
+    my $compileCommand = 'gcc';
+    push(@{$config_mkR}, "CC = $compileCommand\n");
+    push(@{$config_mkR}, gnuCflags($compileCommand));
+}
+
+
+
 sub findProcessManagement($) {
     my ($dontHaveProcessMgmtR) = @_;
 #-----------------------------------------------------------------------------
@@ -1940,29 +1960,12 @@ if (-f("GNUmakefile")) {
     $defaultConfigInPath = "$srcdir/config.mk.in";
 }
 
-sub makeCompilerGcc($) {
-    my ($config_mkR) = @_;
-    my $compileCommand = 'gcc';
-    push(@{$config_mkR}, "CC = $compileCommand\n");
-    push(@{$config_mkR}, gnuCflags($compileCommand));
-}
-
-
 #******************************************************************************
 #
 #  BUILD config.mk
 #
 #*****************************************************************************
 
-sub gnuCflags($) {
-    my ($gccCommandName) = @_;
-
-    return("CFLAGS = " . gnuOptimizeOpt($gccCommandName) . " -ffast-math " .
-           " -pedantic -fno-common " . 
-           "-Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit " .
-           "-Wwrite-strings -Wmissing-prototypes -Wundef\n");
-}
-
 my @config_mk;
     # This is the complete config.mk contents.  We construct it here
     # and ultimately write the whole thing out as config.mk.
@@ -2014,14 +2017,11 @@ if (defined($netpbmlib_runtime_path)) {
 }
 
 if ($platform eq "GNU") {
-    my $compileCommand;
     if (!commandExists("cc") && commandExists("gcc")) {
-        $compileCommand = "gcc";
-        push(@config_mk, "CC = $compileCommand\n");
+        makeCompilerGcc(\@config_mk);
     } else {
-        $compileCommand = "cc";
+        push(@config_mk, gnuCflags('cc'));
     }
-    push(@config_mk, gnuCflags($compileCommand));
 # The merged programs have a main_XXX subroutine instead of main(),
 # which would cause a warning with -Wmissing-declarations or 
 # -Wmissing-prototypes.