Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9db7cca

Browse files
committed
Use system install program when available and usable
Ina3176da we switched to usinginstall-sh unconditionally, because the configure checkAC_PROG_INSTALL would pick up any random program named install, whichhas caused failure reports(http://archives.postgresql.org/pgsql-hackers/2001-03/msg00312.php).Now the configure check is much improved and should avoid falsepositives. It has also been shown that using a system install programcan significantly reduce "make install" times, so it's worth trying.
1 parentc60ca19 commit9db7cca

File tree

3 files changed

+123
-2
lines changed

3 files changed

+123
-2
lines changed

‎configure

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ MKDIR_P
693693
AWK
694694
LN_S
695695
TAR
696+
INSTALL_DATA
697+
INSTALL_SCRIPT
698+
INSTALL_PROGRAM
696699
WINDRES
697700
DLLWRAP
698701
DLLTOOL
@@ -6855,6 +6858,106 @@ fi
68556858

68566859
fi
68576860

6861+
# Find a good install program. We prefer a C program (faster),
6862+
# so one script is as good as another. But avoid the broken or
6863+
# incompatible versions:
6864+
# SysV /etc/install, /usr/sbin/install
6865+
# SunOS /usr/etc/install
6866+
# IRIX /sbin/install
6867+
# AIX /bin/install
6868+
# AmigaOS /C/install, which installs bootblocks on floppy discs
6869+
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6870+
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6871+
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6872+
# OS/2's system install, which has a completely different semantic
6873+
# ./install, which can be erroneously created by make from ./install.sh.
6874+
# Reject install programs that cannot install multiple files.
6875+
{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6876+
$as_echo_n "checking for a BSD-compatible install... " >&6; }
6877+
if test -z "$INSTALL"; then
6878+
if test "${ac_cv_path_install+set}" = set; then
6879+
$as_echo_n "(cached) " >&6
6880+
else
6881+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6882+
for as_dir in $PATH
6883+
do
6884+
IFS=$as_save_IFS
6885+
test -z "$as_dir" && as_dir=.
6886+
# Account for people who put trailing slashes in PATH elements.
6887+
case $as_dir/ in
6888+
./ | .// | /cC/* | \
6889+
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6890+
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6891+
/usr/ucb/* ) ;;
6892+
*)
6893+
# OSF1 and SCO ODT 3.0 have their own names for install.
6894+
# Don't use installbsd from OSF since it installs stuff as root
6895+
# by default.
6896+
for ac_prog in ginstall scoinst install; do
6897+
for ac_exec_ext in '' $ac_executable_extensions; do
6898+
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6899+
if test $ac_prog = install &&
6900+
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6901+
# AIX install. It has an incompatible calling convention.
6902+
:
6903+
elif test $ac_prog = install &&
6904+
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6905+
# program-specific install script used by HP pwplus--don't use.
6906+
:
6907+
else
6908+
rm -rf conftest.one conftest.two conftest.dir
6909+
echo one > conftest.one
6910+
echo two > conftest.two
6911+
mkdir conftest.dir
6912+
if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6913+
test -s conftest.one && test -s conftest.two &&
6914+
test -s conftest.dir/conftest.one &&
6915+
test -s conftest.dir/conftest.two
6916+
then
6917+
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6918+
break 3
6919+
fi
6920+
fi
6921+
fi
6922+
done
6923+
done
6924+
;;
6925+
esac
6926+
6927+
done
6928+
IFS=$as_save_IFS
6929+
6930+
rm -rf conftest.one conftest.two conftest.dir
6931+
6932+
fi
6933+
if test "${ac_cv_path_install+set}" = set; then
6934+
INSTALL=$ac_cv_path_install
6935+
else
6936+
# As a last resort, use the slow shell script. Don't cache a
6937+
# value for INSTALL within a source directory, because that will
6938+
# break other packages using the cache if that directory is
6939+
# removed, or if the value is a relative name.
6940+
INSTALL=$ac_install_sh
6941+
fi
6942+
fi
6943+
{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
6944+
$as_echo "$INSTALL" >&6; }
6945+
6946+
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6947+
# It thinks the first close brace ends the variable substitution.
6948+
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6949+
6950+
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6951+
6952+
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6953+
6954+
# When Autoconf chooses install-sh as install program it tries to generate
6955+
# a relative path to it in each makefile where it subsitutes it. This clashes
6956+
# with our Makefile.global concept. This workaround helps.
6957+
case $INSTALL in
6958+
*install-sh*) INSTALL='';;
6959+
esac
6960+
68586961
# Extract the first word of "tar", so it can be a program name with args.
68596962
set dummy tar; ac_word=$2
68606963
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -30284,6 +30387,7 @@ gives unlimited permission to copy, distribute and modify it."
3028430387

3028530388
ac_pwd='$ac_pwd'
3028630389
srcdir='$srcdir'
30390+
INSTALL='$INSTALL'
3028730391
MKDIR_P='$MKDIR_P'
3028830392
AWK='$AWK'
3028930393
test -n "\$AWK" || AWK=awk
@@ -30897,6 +31001,10 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3089731001
# CONFIG_FILE
3089831002
#
3089931003

31004+
case $INSTALL in
31005+
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31006+
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31007+
esac
3090031008
ac_MKDIR_P=$MKDIR_P
3090131009
case $MKDIR_P in
3090231010
[\\/$]* | ?:[\\/]* ) ;;
@@ -30957,6 +31065,7 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
3095731065
s&@builddir@&$ac_builddir&;t t
3095831066
s&@abs_builddir@&$ac_abs_builddir&;t t
3095931067
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31068+
s&@INSTALL@&$ac_INSTALL&;t t
3096031069
s&@MKDIR_P@&$ac_MKDIR_P&;t t
3096131070
$ac_datarootdir_hack
3096231071
"

‎configure.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,14 @@ if test "$PORTNAME" = "win32"; then
809809
AC_CHECK_TOOL(WINDRES, windres, windres)
810810
fi
811811

812+
AC_PROG_INSTALL
813+
# When Autoconf chooses install-sh as install program it tries to generate
814+
# a relative path to it in each makefile where it subsitutes it. This clashes
815+
# with our Makefile.global concept. This workaround helps.
816+
case $INSTALL in
817+
*install-sh*) INSTALL='';;
818+
esac
819+
812820
AC_PATH_PROG(TAR, tar)
813821
AC_PROG_LN_S
814822
AC_PROG_AWK

‎src/Makefile.global.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ BZIP2= bzip2
289289

290290
# Installation.
291291

292-
INSTALL=$(SHELL)$(top_srcdir)/config/install-sh -c
292+
install_sh =$(SHELL)$(top_srcdir)/config/install-sh -c
293+
INSTALL =$(if$(use_install_sh),$(install_sh),$(or @INSTALL@,$(install_sh)))
293294

294295
INSTALL_SCRIPT_MODE= 755
295296
INSTALL_DATA_MODE= 644
@@ -561,7 +562,10 @@ endif # not PGXS
561562

562563

563564
install-strip:
564-
@$(MAKE) INSTALL_PROGRAM_ENV="STRIPPROG='$(STRIP)'"\
565+
# install-strip always uses install-sh, so that strip options can be
566+
# passed.
567+
$(MAKE) use_install_sh=yes \
568+
INSTALL_PROGRAM_ENV="STRIPPROG='$(STRIP)'" \
565569
INSTALL_STLIB_ENV="STRIPPROG='$(STRIP_STATIC_LIB)'" \
566570
INSTALL_SHLIB_ENV="STRIPPROG='$(STRIP_SHARED_LIB)'" \
567571
INSTALL_STRIP_FLAG=-s \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp