autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: More output_kind


From: Akim Demaille
Subject: FYI: More output_kind
Date: 12 Jun 2001 12:19:24 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Copyleft)

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * autoscan.in (&output_kind): Output the comment only if it exists.
        (%kind_comment): Add entry for `programs'.
        (&output_programs): Use &output_kind.
        (&output_functions, &output_identifiers, &output_headers)
        (&output_programs): Inline, and remove.

Index: autoscan.in
===================================================================
RCS file: /cvs/autoconf/autoscan.in,v
retrieving revision 1.51
diff -u -u -r1.51 autoscan.in
--- autoscan.in 2001/06/12 10:05:27 1.51
+++ autoscan.in 2001/06/12 10:16:27
@@ -58,6 +58,7 @@
    'functions' => 'Checks for library functions.',
    'headers' => 'Checks for header files.',
    'identifiers' => 'Checks for typedefs, structures, and compiler 
characteristics.',
+   'programs' => 'Checks for programs.',
   );
 
 my $configure_scan = 'configure.scan';
@@ -451,12 +452,14 @@
   my ($kind) = @_;
   my @have;
 
-  print CONF "\n# $kind_comment{$kind}\n";
+  print CONF "\n# $kind_comment{$kind}\n"
+    if exists $kind_comment{$kind};
   foreach my $word (sort keys %{$used{$kind}})
     {
       if (defined $macro{$kind}{$word})
        {
-         if ($macro{$kind}{$word} eq $generic_macro{$kind})
+         if (exists $generic_macro{$kind}
+             && $macro{$kind}{$word} eq $generic_macro{$kind})
            {
              push (@have, $word);
              push (@{$needed_macros{"$generic_macro{$kind}([$word])"}},
@@ -473,23 +476,6 @@
 }
 
 
-
-# output_programs ()
-# ------------------
-sub output_programs ()
-{
-  print CONF "\n# Checks for programs.\n";
-  foreach my $word (sort keys %{$used{'programs'}})
-    {
-      print_unique ('programs', $word);
-    }
-  foreach my $word (sort keys %{$used{'makevars'}})
-    {
-      print_unique ('makevars', $word);
-    }
-}
-
-
 # output_libraries ()
 # -------------------
 sub output_libraries ()
@@ -503,30 +489,6 @@
 }
 
 
-# output_headers ()
-# -----------------
-sub output_headers ()
-{
-  output_kind ('headers');
-}
-
-
-# output_identifiers ()
-# ---------------------
-sub output_identifiers ()
-{
-  output_kind ('identifiers');
-}
-
-
-# output_functions ()
-# -------------------
-sub output_functions ()
-{
-  output_kind ('functions');
-}
-
-
 # output (CONFIGURE_SCAN)
 # -----------------------
 # Print a proto configure.ac.
@@ -549,11 +511,12 @@
       print CONF "AC_CONFIG_HEADER([config.h])\n";
     }
 
-  output_programs;
+  output_kind ('programs');
+  output_kind ('makevars');
   output_libraries;
-  output_headers;
-  output_identifiers;
-  output_functions;
+  output_kind ('headers');
+  output_kind ('identifiers');
+  output_kind ('functions');
 
   # Change DIR/Makefile.in to DIR/Makefile.
   foreach my $m (@makefiles)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]