Use the host install program if possible.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ovidiu 1997-10-03 22:02:27 +00:00
parent 5eb9424e5f
commit 1f16581c4a
6 changed files with 71 additions and 31 deletions

View file

@ -1,3 +1,15 @@
Fri Oct 3 14:48:15 1997 Ovidiu Predescu <ovidiu@net-community.com>
* Support the host install program if any.
* Makefile.in: Added definitions for INSTALL variable. Delete the
which_lib program in the clean target.
* config.make.in: Define INSTALL to be the value of HOST_INSTALL
instead of INSTALL.
* configure.in: Check if the INSTALL program is the install-sh script.
If so define HOST_INSTALL to be the install script; otherwise it is
the host install program.
* which_lib.c: Include limits.h.
Fri Oct 3 13:43:18 1997 Ovidiu Predescu <ovidiu@net-community.com>
* Added support for linking with different types of a library,

View file

@ -46,6 +46,10 @@ GNUSTEP_TARGET_OS := $(shell ./clean_os.sh $(GNUSTEP_TARGET_OS))
makedir = $(prefix)/Makefiles
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
all: which_lib
which_lib: which_lib.c
@ -72,7 +76,7 @@ uninstall:
rm -rf $(makedir)
clean:
rm -f *~
rm -f *~ which_lib
distclean: clean
rm -f Makefile config.make

View file

@ -45,7 +45,7 @@ RANLIB = @RANLIB@
RC = @RC@
DLLTOOL = @DLLTOOL@
INSTALL = @INSTALL@
INSTALL = @HOST_INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

50
configure vendored
View file

@ -939,6 +939,7 @@ else
echo "$ac_t""no" 1>&6
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@ -950,7 +951,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:954: checking for a BSD compatible install" >&5
echo "configure:955: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -999,8 +1000,18 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# HOST_INSTALL is the name of the install program in config.make so set it up
# to point to the install-sh script in the GNUstep tree if no system install is
# found.
if test "$INSTALL" = "$ac_install_sh"; then
HOST_INSTALL=$prefix/Makefiles/$INSTALL
else
HOST_INSTALL=$INSTALL
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1004: checking whether ln -s works" >&5
echo "configure:1015: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1029,7 +1040,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:1033: checking for X" >&5
echo "configure:1044: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@ -1091,12 +1102,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 1095 "configure"
#line 1106 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1165,14 +1176,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1169 "configure"
#line 1180 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@ -1275,12 +1286,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:1279: checking for $ac_hdr that defines DIR" >&5
echo "configure:1290: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1284 "configure"
#line 1295 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -1288,7 +1299,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -1313,7 +1324,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:1317: checking for opendir in -ldir" >&5
echo "configure:1328: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1321,7 +1332,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1325 "configure"
#line 1336 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1332,7 +1343,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1354,7 +1365,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:1358: checking for opendir in -lx" >&5
echo "configure:1369: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1362,7 +1373,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1366 "configure"
#line 1377 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1373,7 +1384,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1399,17 +1410,17 @@ for ac_hdr in sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h sys/s
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1403: checking for $ac_hdr" >&5
echo "configure:1414: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1408 "configure"
#line 1419 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1612,6 +1623,7 @@ s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@HOST_INSTALL@%$HOST_INSTALL%g
s%@LN_S@%$LN_S%g
s%@X_INCLUDE@%$X_INCLUDE%g
s%@X_LIBS@%$X_LIBS%g

View file

@ -43,7 +43,18 @@ AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_INSTALL
# HOST_INSTALL is the name of the install program in config.make so set it up
# to point to the install-sh script in the GNUstep tree if no system install is
# found.
AC_SUBST(HOST_INSTALL)
if test "$INSTALL" = "$ac_install_sh"; then
HOST_INSTALL=$prefix/Makefiles/$INSTALL
else
HOST_INSTALL=$INSTALL
fi
AC_LN_S
#--------------------------------------------------------------------

View file

@ -53,6 +53,12 @@
# include <string.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include <fcntl.h>
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
#elif defined(HAVE_SYS_DIR_H)
@ -79,13 +85,14 @@
/* determine filesystem max path length */
#ifdef _POSIX_VERSION
# include <limits.h> /* for PATH_MAX */
#ifdef _POSIX_VERSION
# include <utime.h>
#else
#if HAVE_SYS_PARAM_H
# include <sys/param.h> /* for MAXPATHLEN */
#endif
# if HAVE_SYS_PARAM_H
# include <sys/param.h> /* for MAXPATHLEN */
# endif
#endif
#ifndef PATH_MAX
@ -104,12 +111,6 @@
#include <sys/file.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include <fcntl.h>
#define PATH_SEP "/"
/* Array of strings that are the library paths passed to compiler */