-# $Header: /cvsroot/pgsql/config/programs.m4,v 1.8 2002/03/29 17:32:54 petere Exp $
+# $Header: /cvsroot/pgsql/config/programs.m4,v 1.9 2002/04/10 16:45:24 petere Exp $
# PGAC_PATH_FLEX
AC_DEFINE_UNQUOTED(LOCALEDIR, ["$exp_localedir"],
[location of locale files])
])# PGAC_CHECK_GETTEXT
+
+
+
+# PGAC_CHECK_STRIP
+# ----------------
+# Check for a 'strip' program, and figure out if that program can
+# strip libraries.
+
+AC_DEFUN([PGAC_CHECK_STRIP],
+[
+ AC_CHECK_TOOL(STRIP, strip, :)
+
+ AC_MSG_CHECKING([whether it is possible to strip libraries])
+ if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
+ STRIP_STATIC_LIB="$STRIP -x"
+ STRIP_SHARED_LIB="$STRIP --strip-unneeded"
+ AC_MSG_RESULT(yes)
+ else
+ STRIP_STATIC_LIB=:
+ STRIP_SHARED_LIB=:
+ AC_MSG_RESULT(no)
+ fi
+ AC_SUBST(STRIP_STATIC_LIB)
+ AC_SUBST(STRIP_SHARED_LIB)
+])# PGAC_CHECK_STRIP
fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+ echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
+echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
+ if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
+ STRIP_STATIC_LIB="$STRIP -x"
+ STRIP_SHARED_LIB="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ STRIP_STATIC_LIB=:
+ STRIP_SHARED_LIB=:
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+
+
+
+
for ac_prog in 'bison -y'
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LORDER@,$LORDER,;t t
s,@TAR@,$TAR,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
+s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
s,@YACC@,$YACC,;t t
s,@YFLAGS@,$YFLAGS,;t t
s,@WISH@,$WISH,;t t
dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.175 2002/04/03 05:39:27 petere Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.176 2002/04/10 16:45:24 petere Exp $
dnl Developers, please strive to achieve this order:
dnl
AC_PROG_RANLIB
AC_CHECK_PROGS(LORDER, lorder)
AC_PATH_PROG(TAR, tar)
+PGAC_CHECK_STRIP
AC_CHECK_PROGS(YACC, ['bison -y'])
if test -z "$YACC"; then
-
+
PostgreSQL>]]>
be granted.
+ You can use gmake install-strip instead of
+ gmake install to strip the executable files and
+ libraries as they are installed. This will save some space. If
+ you built with debugging support, stripping will effectively
+ remove the debugging support, so it should only be done if
+ debugging is no longer needed. install-strip
+ tries to do a reasonable job saving space, but it does not have
+ perfect knowledge of how to strip every unneeded byte from an
+ executable file, so if you want to save all the disk space you
+ possibly can, you will have to do manual work.
+
+
If you built the Perl or Python interfaces and you were not the
root user when you executed the above command then that part of
# -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.144 2002/03/29 17:32:54 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.145 2002/04/10 16:45:25 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
#
# Meta configuration
-.PHONY: all install installdirs uninstall clean distclean maintainer-clean distprep check installcheck maintainer-check
+.PHONY: all install install-strip installdirs uninstall clean distclean maintainer-clean distprep check installcheck maintainer-check
.SILENT: installdirs
# make `all' the default target
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
+INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG)
INSTALL_SCRIPT = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
-INSTALL_SHLIB = $(INSTALL) $(INSTALL_SHLIB_OPTS)
+INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG)
+INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG)
# Override in Makefile.port if necessary
INSTALL_SHLIB_OPTS = -m 755
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
missing = $(SHELL) $(top_srcdir)/config/missing
+STRIP = @STRIP@
+STRIP_STATIC_LIB = @STRIP_STATIC_LIB@
+STRIP_SHARED_LIB = @STRIP_SHARED_LIB@
+
# Documentation
JADE = @JADE@
cd $(top_builddir) && ./config.status --recheck
+install-strip:
+ @$(MAKE) INSTALL_PROGRAM_ENV="STRIPPROG='$(STRIP)'" \
+ INSTALL_STLIB_ENV="STRIPPROG='$(STRIP_STATIC_LIB)'" \
+ INSTALL_SHLIB_ENV="STRIPPROG='$(STRIP_SHARED_LIB)'" \
+ INSTALL_STRIP_FLAG=-s \
+ install
+
+
##########################################################################
#
# Automatic dependency generation
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.56 2001/11/11 19:20:53 momjian Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.57 2002/04/10 16:45:25 petere Exp $
#
#-------------------------------------------------------------------------
install-lib: install-lib-static install-lib-shared
install-lib-static: lib$(NAME).a
- $(INSTALL_DATA) $< $(DESTDIR)$(libdir)/lib$(NAME).a
+ $(INSTALL_STLIB) $< $(DESTDIR)$(libdir)/lib$(NAME).a
ifeq ($(enable_shared), yes)
install-lib-shared: $(shlib)