Browse Source

Unify m4 macro names.

Macros get from other projects keep their original names:
gl_FSTYPENAME, AX_PATH_LIB_PCRE, etc.

Macros initially writtem for MC have original names with prefix mc_:
mc_VERSION, mc_CHECK_GLIB, etc

Macros get from other projects and modified for MC keep their
original names with prefix mc_:
mc_cu_PREREQ_STAT_PROG, mc_AC_GET_FS_INFO.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Andrew Borodin 9 years ago
parent
commit
0eae2cb8dc

+ 14 - 14
configure.ac

@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_SRCDIR(src/main.c)
 AC_CONFIG_HEADERS(config.h)
-MC_VERSION
+mc_VERSION
 AM_INIT_AUTOMAKE(mc, ${VERSION} )
 dnl Enable silent rules by default (if yes)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -28,7 +28,7 @@ dnl ############################################################################
 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
 
-MC_CHECK_CFLAGS
+mc_CHECK_CFLAGS
 
 CFLAGS_OPTS=""
 if test "x$CFLAGS" = "x"; then
@@ -42,7 +42,7 @@ fi
 AC_ARG_ENABLE([werror],
     AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors]))
 if test "x$enable_werror" = xyes; then
-    MC_CHECK_ONE_CFLAG([-Werror])
+    mc_CHECK_ONE_CFLAG([-Werror])
 fi
 
 AC_PROG_LIBTOOL
@@ -137,19 +137,19 @@ dnl Check for other tools
 dnl ############################################################################
 
 AC_CHECK_TOOL(AR, ar, ar)
-MC_UNIT_TESTS
+mc_UNIT_TESTS
 
 
 dnl ############################################################################
 dnl Check for main libraies
 dnl ############################################################################
 
-AC_CHECK_GLIB
-AC_G_MODULE_SUPPORTED
-MC_WITH_SCREEN
-MC_CHECK_SEARCH_TYPE
+mc_CHECK_GLIB
+mc_G_MODULE_SUPPORTED
+mc_WITH_SCREEN
+mc_CHECK_SEARCH_TYPE
 dnl X11 support. Used to read keyboard modifiers when running under X11.
-MC_WITH_X
+mc_WITH_X
 
 
 dnl ############################################################################
@@ -266,7 +266,7 @@ dnl ############################################################################
 AM_GNU_GETTEXT(no-libtool, need-ngettext)
 AM_GNU_GETTEXT_VERSION(0.14.3)
 
-MC_I18N
+mc_I18N
 
 dnl ############################################################################
 dnl OS specific flags
@@ -384,7 +384,7 @@ dnl ############################################################################
 dnl MC options
 dnl ############################################################################
 
-MC_WITH_INTERNAL_EDIT
+mc_WITH_INTERNAL_EDIT
 
 dnl Diff viewer support.
 AC_ARG_WITH([diff_viewer],
@@ -399,9 +399,9 @@ else
 	diff_msg="no"
 fi
 
-MC_SUBSHELL
-MC_BACKGROUND
-AC_MC_VFS_CHECKS
+mc_SUBSHELL
+mc_BACKGROUND
+mc_VFS_CHECKS
 
 dnl ############################################################################
 dnl Directories

+ 3 - 3
m4.include/mc-background.m4

@@ -2,15 +2,15 @@ dnl
 dnl Support for background operations
 dnl
 
-AC_DEFUN([MC_BACKGROUND],
+AC_DEFUN([mc_BACKGROUND],
 [
     AC_ARG_ENABLE([background],
     AS_HELP_STRING([--enable-background], [Support for background file operations [yes]]),
     [
         if test "x$enableval" = xno; then
-        enable_background=no
+            enable_background=no
         else
-        enable_background=yes
+            enable_background=yes
         fi
     ],
     [enable_background=yes])

+ 48 - 48
m4.include/mc-cflags.m4

@@ -1,4 +1,4 @@
-dnl @synopsis MC_CHECK_CFLAGS
+dnl @synopsis mc_CHECK_CFLAGS
 dnl
 dnl Check flags supported by C compiler
 dnl
@@ -7,7 +7,7 @@ dnl @version 2013-01-16
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 
-AC_DEFUN([MC_CHECK_ONE_CFLAG],[
+AC_DEFUN([mc_CHECK_ONE_CFLAG],[
 
   AC_MSG_CHECKING([whether ${CC} accepts $1])
 
@@ -35,7 +35,7 @@ AC_DEFUN([MC_CHECK_ONE_CFLAG],[
   fi
 ])
 
-AC_DEFUN([MC_CHECK_CFLAGS],[
+AC_DEFUN([mc_CHECK_CFLAGS],[
     AC_LANG_PUSH(C)
 
     mc_configured_cflags=""
@@ -44,57 +44,57 @@ dnl Sorted -f options:
 dnl AC_MSG_CHECKING([CC is $CC])
 case "$CC" in
   gcc*)
-    MC_CHECK_ONE_CFLAG([-fdiagnostics-show-option])
-dnl    MC_CHECK_ONE_CFLAG([-fno-stack-protector])
+    mc_CHECK_ONE_CFLAG([-fdiagnostics-show-option])
+dnl    mc_CHECK_ONE_CFLAG([-fno-stack-protector])
     ;;
   *)
     ;;
 esac
 
 dnl Sorted -W options:
-    MC_CHECK_ONE_CFLAG([-Wbad-function-cast])
-    MC_CHECK_ONE_CFLAG([-Wcomment])
-    MC_CHECK_ONE_CFLAG([-Wdeclaration-after-statement])
-    MC_CHECK_ONE_CFLAG([-Wfloat-equal])
-    MC_CHECK_ONE_CFLAG([-Wformat])
-    MC_CHECK_ONE_CFLAG([-Wformat-security])
-    MC_CHECK_ONE_CFLAG([-Wimplicit])
-    MC_CHECK_ONE_CFLAG([-Wignored-qualifiers])
-    MC_CHECK_ONE_CFLAG([-Wmaybe-uninitialized])
-    MC_CHECK_ONE_CFLAG([-Wmissing-braces])
-    MC_CHECK_ONE_CFLAG([-Wmissing-declarations])
-    MC_CHECK_ONE_CFLAG([-Wmissing-field-initializers])
-    MC_CHECK_ONE_CFLAG([-Wmissing-format-attribute])
-    MC_CHECK_ONE_CFLAG([-Wmissing-parameter-type])
-    MC_CHECK_ONE_CFLAG([-Wmissing-prototypes])
-    MC_CHECK_ONE_CFLAG([-Wmissing-variable-declarations])
-    MC_CHECK_ONE_CFLAG([-Wnested-externs])
-    MC_CHECK_ONE_CFLAG([-Wno-long-long])
-    MC_CHECK_ONE_CFLAG([-Wno-unreachable-code])
-    MC_CHECK_ONE_CFLAG([-Wparentheses])
-    MC_CHECK_ONE_CFLAG([-Wpointer-arith])
-    MC_CHECK_ONE_CFLAG([-Wpointer-sign])
-    MC_CHECK_ONE_CFLAG([-Wredundant-decls])
-    MC_CHECK_ONE_CFLAG([-Wreturn-type])
-    MC_CHECK_ONE_CFLAG([-Wsequence-point])
-    MC_CHECK_ONE_CFLAG([-Wshadow])
-    MC_CHECK_ONE_CFLAG([-Wsign-compare])
-dnl    MC_CHECK_ONE_CFLAG([-Wstrict-aliasing])
-    MC_CHECK_ONE_CFLAG([-Wstrict-prototypes])
-    MC_CHECK_ONE_CFLAG([-Wswitch])
-    MC_CHECK_ONE_CFLAG([-Wswitch-default])
-    MC_CHECK_ONE_CFLAG([-Wtype-limits])
-    MC_CHECK_ONE_CFLAG([-Wundef])
-    MC_CHECK_ONE_CFLAG([-Wuninitialized])
-    MC_CHECK_ONE_CFLAG([-Wunreachable-code])
-    MC_CHECK_ONE_CFLAG([-Wunused-but-set-variable])
-    MC_CHECK_ONE_CFLAG([-Wunused-function])
-    MC_CHECK_ONE_CFLAG([-Wunused-label])
-    MC_CHECK_ONE_CFLAG([-Wunused-parameter])
-    MC_CHECK_ONE_CFLAG([-Wunused-result])
-    MC_CHECK_ONE_CFLAG([-Wunused-value])
-    MC_CHECK_ONE_CFLAG([-Wunused-variable])
-    MC_CHECK_ONE_CFLAG([-Wwrite-strings])
+    mc_CHECK_ONE_CFLAG([-Wbad-function-cast])
+    mc_CHECK_ONE_CFLAG([-Wcomment])
+    mc_CHECK_ONE_CFLAG([-Wdeclaration-after-statement])
+    mc_CHECK_ONE_CFLAG([-Wfloat-equal])
+    mc_CHECK_ONE_CFLAG([-Wformat])
+    mc_CHECK_ONE_CFLAG([-Wformat-security])
+    mc_CHECK_ONE_CFLAG([-Wimplicit])
+    mc_CHECK_ONE_CFLAG([-Wignored-qualifiers])
+    mc_CHECK_ONE_CFLAG([-Wmaybe-uninitialized])
+    mc_CHECK_ONE_CFLAG([-Wmissing-braces])
+    mc_CHECK_ONE_CFLAG([-Wmissing-declarations])
+    mc_CHECK_ONE_CFLAG([-Wmissing-field-initializers])
+    mc_CHECK_ONE_CFLAG([-Wmissing-format-attribute])
+    mc_CHECK_ONE_CFLAG([-Wmissing-parameter-type])
+    mc_CHECK_ONE_CFLAG([-Wmissing-prototypes])
+    mc_CHECK_ONE_CFLAG([-Wmissing-variable-declarations])
+    mc_CHECK_ONE_CFLAG([-Wnested-externs])
+    mc_CHECK_ONE_CFLAG([-Wno-long-long])
+    mc_CHECK_ONE_CFLAG([-Wno-unreachable-code])
+    mc_CHECK_ONE_CFLAG([-Wparentheses])
+    mc_CHECK_ONE_CFLAG([-Wpointer-arith])
+    mc_CHECK_ONE_CFLAG([-Wpointer-sign])
+    mc_CHECK_ONE_CFLAG([-Wredundant-decls])
+    mc_CHECK_ONE_CFLAG([-Wreturn-type])
+    mc_CHECK_ONE_CFLAG([-Wsequence-point])
+    mc_CHECK_ONE_CFLAG([-Wshadow])
+    mc_CHECK_ONE_CFLAG([-Wsign-compare])
+dnl  mc_CHECK_ONE_CFLAG([-Wstrict-aliasing])
+    mc_CHECK_ONE_CFLAG([-Wstrict-prototypes])
+    mc_CHECK_ONE_CFLAG([-Wswitch])
+    mc_CHECK_ONE_CFLAG([-Wswitch-default])
+    mc_CHECK_ONE_CFLAG([-Wtype-limits])
+    mc_CHECK_ONE_CFLAG([-Wundef])
+    mc_CHECK_ONE_CFLAG([-Wuninitialized])
+    mc_CHECK_ONE_CFLAG([-Wunreachable-code])
+    mc_CHECK_ONE_CFLAG([-Wunused-but-set-variable])
+    mc_CHECK_ONE_CFLAG([-Wunused-function])
+    mc_CHECK_ONE_CFLAG([-Wunused-label])
+    mc_CHECK_ONE_CFLAG([-Wunused-parameter])
+    mc_CHECK_ONE_CFLAG([-Wunused-result])
+    mc_CHECK_ONE_CFLAG([-Wunused-value])
+    mc_CHECK_ONE_CFLAG([-Wunused-variable])
+    mc_CHECK_ONE_CFLAG([-Wwrite-strings])
 
     AC_LANG_POP()
 ])

+ 7 - 7
m4.include/mc-check-search-type.m4

@@ -1,4 +1,4 @@
-dnl @synopsis MC_VERSION
+dnl @synopsis mc_CHECK_SEARCH_TYPE
 dnl
 dnl Check search type in mc. Currently used glib-regexp or pcre
 dnl
@@ -7,7 +7,7 @@ dnl @version 2009-06-19
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 
-AC_DEFUN([MC_CHECK_SEARCH_TYPE_PCRE],[
+AC_DEFUN([mc_CHECK_SEARCH_TYPE_PCRE],[
     AX_PATH_LIB_PCRE
     if test x"${PCRE_LIBS}" = x; then
 	AC_MSG_ERROR([Your system don't have pcre library (or pcre devel stuff)])
@@ -18,18 +18,18 @@ AC_DEFUN([MC_CHECK_SEARCH_TYPE_PCRE],[
 ])
 
 
-AC_DEFUN([MC_CHECK_SEARCH_TYPE_GLIB],[
+AC_DEFUN([mc_CHECK_SEARCH_TYPE_GLIB],[
     $PKG_CONFIG --max-version 2.14 glib-2.0
     if test $? -eq 0; then
 	AC_MSG_RESULT([[Selected 'glib' search engine, but you don't have glib >= 2.14. Trying to use 'pcre' engine], (WARNING)])
-	MC_CHECK_SEARCH_TYPE_PCRE
+	mc_CHECK_SEARCH_TYPE_PCRE
     else
 	AC_DEFINE(SEARCH_TYPE_GLIB, 1, [Define to select 'glib-regexp' search type])
     fi
 ])
 
 
-AC_DEFUN([MC_CHECK_SEARCH_TYPE],[
+AC_DEFUN([mc_CHECK_SEARCH_TYPE],[
 
     AC_ARG_WITH([search-engine],
         AS_HELP_STRING([--with-search-engine=type],
@@ -40,7 +40,7 @@ AC_DEFUN([MC_CHECK_SEARCH_TYPE],[
 	SEARCH_TYPE="glib-regexp"
 	;;
     xpcre)
-	MC_CHECK_SEARCH_TYPE_PCRE
+	mc_CHECK_SEARCH_TYPE_PCRE
 	;;
     x)
 	SEARCH_TYPE="glib-regexp"
@@ -51,6 +51,6 @@ AC_DEFUN([MC_CHECK_SEARCH_TYPE],[
     esac
 
     if test x"$SEARCH_TYPE" = x"glib-regexp"; then
-	MC_CHECK_SEARCH_TYPE_GLIB
+	mc_CHECK_SEARCH_TYPE_GLIB
     fi
 ])

+ 2 - 2
m4.include/mc-glib.m4

@@ -3,7 +3,7 @@ dnl Check whether the g_module_* family of functions works
 dnl on this system.  We need to know that at the compile time to
 dnl decide whether to link with X11.
 dnl
-AC_DEFUN([AC_G_MODULE_SUPPORTED], [
+AC_DEFUN([mc_G_MODULE_SUPPORTED], [
 
     g_module_supported=""
 
@@ -67,7 +67,7 @@ AC_DEFUN([AC_G_MODULE_SUPPORTED], [
 
 ])
 
-AC_DEFUN([AC_CHECK_GLIB], [
+AC_DEFUN([mc_CHECK_GLIB], [
     dnl
     dnl First try glib 2.x.
     dnl Keep this check close to the beginning, so that the users

+ 2 - 2
m4.include/mc-i18n.m4

@@ -1,4 +1,4 @@
-dnl @synopsis MC_DOC_LINGUAS
+dnl @synopsis mc_I18N
 dnl
 dnl Check if environment is ready for get translations of docs from transifex
 dnl
@@ -7,7 +7,7 @@ dnl @version 2011-02-10
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 
-AC_DEFUN([MC_I18N],[
+AC_DEFUN([mc_I18N],[
 
     if test "x$USE_INCLUDED_LIBINTL" = xyes; then
         CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"

+ 1 - 1
m4.include/mc-subshell.m4

@@ -1,7 +1,7 @@
 dnl
 dnl Subshell support.
 dnl
-AC_DEFUN([MC_SUBSHELL], [
+AC_DEFUN([mc_SUBSHELL], [
 
     AC_MSG_CHECKING([for subshell support])
     AC_ARG_WITH(subshell,

+ 2 - 2
m4.include/mc-tests.m4

@@ -1,4 +1,4 @@
-dnl @synopsis MC_UNIT_TESTS
+dnl @synopsis mc_UNIT_TESTS
 dnl
 dnl Check if unit tests enabled
 dnl
@@ -7,7 +7,7 @@ dnl @version 2011-02-10
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 
-AC_DEFUN([MC_UNIT_TESTS],[
+AC_DEFUN([mc_UNIT_TESTS],[
 
     AC_ARG_ENABLE(
         [tests],

+ 3 - 3
m4.include/mc-use-termcap.m4

@@ -1,7 +1,7 @@
 dnl
 dnl Try using termcap database and link with libtermcap if possible.
 dnl
-AC_DEFUN([MC_USE_TERMCAP], [
+AC_DEFUN([mc_USE_TERMCAP], [
 	screen_msg="$screen_msg with termcap database"
 	AC_MSG_NOTICE([using S-Lang screen library with termcap])
 	AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database])
@@ -11,7 +11,7 @@ AC_DEFUN([MC_USE_TERMCAP], [
 dnl
 dnl Check if the installed S-Lang library uses termcap
 dnl
-AC_DEFUN([MC_SLANG_TERMCAP], [
+AC_DEFUN([mc_SLANG_TERMCAP], [
     unset ac_cv_lib_termcap_tgoto
 
     AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [
@@ -31,6 +31,6 @@ AC_DEFUN([MC_SLANG_TERMCAP], [
     ])
 
     if test x"$mc_cv_slang_termcap" = xyes; then
-	MC_USE_TERMCAP
+	mc_USE_TERMCAP
     fi
 ])

+ 2 - 2
m4.include/mc-version.m4

@@ -1,4 +1,4 @@
-dnl @synopsis MC_VERSION
+dnl @synopsis mc_VERSION
 dnl
 dnl Get current version of Midnight Commander from git tags
 dnl
@@ -7,7 +7,7 @@ dnl @version 2009-12-30
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 
-AC_DEFUN([MC_VERSION],[
+AC_DEFUN([mc_VERSION],[
     if test ! -f ${srcdir}/version.h; then
         ${srcdir}/maint/utils/version.sh ${srcdir}
     fi

Some files were not shown because too many files changed in this diff