]> code.delx.au - gnu-emacs/blobdiff - configure.ac
Further reduce number of versioned files storing Emacs version number.
[gnu-emacs] / configure.ac
index b2b98a0936b843afc3e8db6c8f0d6e1399f13f54..85d11234035e9b79b8803b5602753d6f7fc601d6 100644 (file)
@@ -899,14 +899,15 @@ else
   fi
 
   AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
-  AH_VERBATIM([FORTIFY_SOURCE],
+  AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
+  AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE],
   [/* Enable compile-time and run-time bounds-checking, and some warnings,
       without upsetting glibc 2.15+. */
-   #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+   #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \
+        && defined __OPTIMIZE__ && __OPTIMIZE__)
    # define _FORTIFY_SOURCE 2
    #endif
   ])
-  AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
 
   # We use a slightly smaller set of warning options for lib/.
   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
@@ -4678,6 +4679,15 @@ AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
 case $opsys in
   mingw32)
     AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
+
+    dnl Construct something of the form "24,4,0,0" with 4 components.
+    comma_version=`echo "$version.0.0" | sed -e 's/\./,/g' -e 's/^\([[^,]]*,[[^,]]*,[[^,]]*,[[^,]]*\).*/\1/'`
+
+    comma_space_version=`echo "$comma_version" | sed 's/,/, /g'`
+
+    AC_SUBST(comma_version)
+    AC_SUBST(comma_space_version)
+    AC_CONFIG_FILES([nt/emacs.rc nt/emacsclient.rc])
     ;;
 esac