[nautilus-actions] Rename m4 compiler macros to NA_COMPILER_xxx



commit 5e2bdbeaebf0f401d1f286278051547136701435
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Jan 30 19:38:16 2014 +0100

    Rename m4 compiler macros to NA_COMPILER_xxx

 ChangeLog                                   |    3 ++
 configure.ac                                |   28 +++++++++++++++-----------
 m4/{na-compiler-flags.m4 => na-compiler.m4} |   27 +++++++++++--------------
 3 files changed, 31 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 410ed06..c7dd342 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-01-30 Pierre Wieser <pwieser trychlos org>
 
+       * m4/na-compiler-flags.m4: Renamed to m4/na-compiler.m4.
+       * m4/na-compiler.m4: Macros are renamed as NA_COMPILER_xxxx.
+
        * maintainer/README:
        * maintainer/Makefile.am:
        * maintainer/.gitignore: New files.
diff --git a/configure.ac b/configure.ac
index ed97efb..33c8f1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,9 +33,24 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 
-AC_CONFIG_SRCDIR([src/plugin-menu/nautilus-module.c])
+AC_CONFIG_SRCDIR([src/nact/main.c])
 AC_CONFIG_HEADERS([src/config.h])
 
+AC_CONFIG_MACRO_DIR([m4])
+
+# check for compiler characteristics and options
+AC_PROG_CC
+AC_PROG_GCC_TRADITIONAL
+AC_STDC_HEADERS
+AM_DISABLE_STATIC
+
+# define specific compilation options
+NA_COMPILER_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
+NA_COMPILER_LINK_AS_NEEDED
+AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])
+
+###
+
 AC_CONFIG_FILES([
        Makefile
        data/Makefile
@@ -68,8 +83,6 @@ AC_CONFIG_FILES([
        maintainer/Makefile
 ])
 
-AC_CONFIG_MACRO_DIR([m4])
-
 # pwi 2009-05-15 disabled as GNOME_COMMON_INIT takes care of that
 #AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
 
@@ -78,12 +91,6 @@ AC_CONFIG_MACRO_DIR([m4])
 # but gnome-autogen.sh forces its usage and gnome_common_init requires it
 AM_MAINTAINER_MODE
 
-# check for compiler characteristics and options
-AC_PROG_CC
-AC_PROG_GCC_TRADITIONAL
-AC_STDC_HEADERS
-AM_DISABLE_STATIC
-
 # other traditional tools
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
@@ -91,9 +98,6 @@ AC_PROG_MAKE_SET
 # Gnome stuff
 GNOME_COMMON_INIT
 GNOME_MAINTAINER_MODE_DEFINES
-NA_LINK_AS_NEEDED
-NA_GNOME_COMPILE_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
-AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])
 
 # GLib marshaling
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
diff --git a/m4/na-compiler-flags.m4 b/m4/na-compiler.m4
similarity index 92%
rename from m4/na-compiler-flags.m4
rename to m4/na-compiler.m4
index 18249f2..7762c47 100644
--- a/m4/na-compiler-flags.m4
+++ b/m4/na-compiler.m4
@@ -25,18 +25,16 @@
 #   Pierre Wieser <pwieser trychlos org>
 #   ... and many others (see AUTHORS)
 
-dnl GNOME_COMPILE_WARNINGS
+# serial 4 rename macro to NA_COMPILER_WARNINGS
+
+dnl NA_COMPILER_WARNINGS
 dnl Turn on many useful compiler warnings
 dnl For now, only works on GCC
+dnl
+dnl pwi 2009-05-15 shamelessly copied from gnome-compiler-flags.m4
+dnl two patch have been submitted (see gnome-common #582860)
 
-# serial 3 Fix to correctly handle provided default values
-
-#
-# pwi 2009-05-15 shamelessly copied from gnome-compiler-flags.m4
-# two patch have been submitted (see gnome-common #582860)
-#
-
-AC_DEFUN([NA_GNOME_COMPILE_WARNINGS],[
+AC_DEFUN([NA_COMPILER_WARNINGS],[
 
        _ac_warning_def=m4_default([$1],[yes])
        _ac_compliant_def=m4_default(["$2"],[no])
@@ -187,20 +185,19 @@ dnl Bug #637797
 dnl see also http://www.gentoo.org/proj/en/qa/asneeded.xml
 dnl the '-Wl,--as-needed' link option is forced in make distcheck
 
-AC_DEFUN([NA_LINK_AS_NEEDED],[
+AC_DEFUN([NA_COMPILER_LINK_AS_NEEDED],[
        AC_ARG_ENABLE(
                [as-needed],
                AC_HELP_STRING(
-                       [--enable-as-needed],
-                       [Enable '-Wl,--as-needed' link option @<:@no@:>@]
-               ),
+                       [--disable-as-needed],
+                       [Whether to only link against needed libraries]),
                [enable_as_needed=$enableval],
-               [enable_as_needed=no])
+               [enable_as_needed=yes])
 
        AC_MSG_CHECKING([whether to only link with needed libraries])
        AC_MSG_RESULT([$enable_as_needed])
 
-       if test "x${enable_as_needed}" = "xyes"; then
+       if test "${enable_as_needed}" = "yes"; then
                AC_SUBST([AM_LDFLAGS],["${AM_LDFLAGS} -Wl,--as-needed"])
        fi
 ])


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