Record full paths of programs sought by "configure".
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Jul 2017 17:02:49 +0000 (13:02 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Jul 2017 17:02:49 +0000 (13:02 -0400)
Previously we had a mix of uses of AC_CHECK_PROG[S] and AC_PATH_PROG[S].
The only difference between those macros is that the latter emits the
full path to the program it finds, eg "/usr/bin/prove", whereas the
former emits just "prove".  Let's standardize on always emitting the
full path; this is better for documentation of the build, and it might
prevent some types of failures if later build steps are done with
a different PATH setting.

I did not touch the AC_CHECK_PROG[S] calls in ax_pthread.m4 and
ax_prog_perl_modules.m4.  There seems no need to make those diverge from
upstream, since we do not record the programs sought by the former, while
the latter's call to AC_CHECK_PROG(PERL,...) will never be reached.

Discussion: https://postgr.es/m/25937.1501433410@sss.pgh.pa.us

config/docbook.m4
config/programs.m4
configure
configure.in

index d5503093530446ceeafa08be8d04defb7a9b2517..c485eaf737f4430ac2c2df1e00130d76704b01cb 100644 (file)
@@ -3,7 +3,7 @@
 # PGAC_PROG_NSGMLS
 # ----------------
 AC_DEFUN([PGAC_PROG_NSGMLS],
-[AC_CHECK_PROGS([NSGMLS], [onsgmls nsgmls])])
+[AC_PATH_PROGS([NSGMLS], [onsgmls nsgmls])])
 
 
 # PGAC_CHECK_DOCBOOK(VERSION)
index 5fa03c373959dae8dbc4373b28d7f9fe89851b28..b7deb86a5ff135c69fc8f43e4219bc3bf50774a9 100644 (file)
@@ -229,7 +229,7 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
                  [AC_MSG_ERROR([a gettext implementation is required for NLS])])
   AC_CHECK_HEADER([libintl.h], [],
                   [AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
-  AC_CHECK_PROGS(MSGFMT, msgfmt)
+  AC_PATH_PROGS(MSGFMT, msgfmt)
   if test -z "$MSGFMT"; then
     AC_MSG_ERROR([msgfmt is required for NLS])
   fi
@@ -238,8 +238,8 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
     pgac_cv_msgfmt_flags=-c
 fi])
   AC_SUBST(MSGFMT_FLAGS, $pgac_cv_msgfmt_flags)
-  AC_CHECK_PROGS(MSGMERGE, msgmerge)
-  AC_CHECK_PROGS(XGETTEXT, xgettext)
+  AC_PATH_PROGS(MSGMERGE, msgmerge)
+  AC_PATH_PROGS(XGETTEXT, xgettext)
 ])# PGAC_CHECK_GETTEXT