Commit bc564084 authored by Marc G. Fournier's avatar Marc G. Fournier

Bring back in the autoconf files - work in progress

parent 9cabea22
#-------------------------------------------------------------------------
#
# Makefile.inc--
# Build and install postgres.
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.4 1997/02/04 08:53:45 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR= .
include Makefile.global
FIND = @find@
# assuming gnu tar and split here
TAR = @tar@
SPLIT = @split@
ETAGS = @etags@
XARGS = @xargs@
.DEFAULT all:
@if test $(PORTNAME) = UNDEFINED; then \
echo You must set the PORTNAME value in Makefile.global before \
you can build Postgres. ;\
false ;\
else true;\
fi
$(MAKE) -C utils $@
$(MAKE) -C backend $@
$(MAKE) -C libpq $@
ifeq ($(HAVE_Cplusplus), true)
$(MAKE) -C libpq++ $@
endif
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
endif
$(MAKE) -C bin $@
ifneq ($(wildcard man), )
$(MAKE) -C man $@
endif
@if test $@. = all. -o $@. = .; then \
echo All of Postgres95 is successfully made. Ready to install. ;\
fi
TAGS:
rm -f TAGS; \
for i in backend libpq bin; do \
$(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
done
# target to generate a backup tar file and split files that can be
# saved to 1.44M floppy
BACKUP:
rm -f BACKUP.filelist BACKUP.tgz; \
$(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
$(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
$(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.
.PHONY: TAGS
.PHONY: BACKUP
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_INIT(backend/access/common/heaptuple.c)
AC_CANONICAL_HOST
case "$host_os" in
solaris*)
case "$host_cpu" in
sparc) PORTNAME='sparc_solaris' ;;
i386) PORTNAME='i386_solaris' ;;
esac ;;
linux*) PORTNAME='linux' ;;
freebsd*) PORTNAME='BSD44_derived' ;;
dgux*) PORTNAME='dgux';;
*) echo ""
echo "*************************************************************"
echo "configure does not currently recognize your operating system,"
echo "therefore you must do a manual configuration of:"
echo ""
echo " Makefile.global"
echo " include/config.h"
echo ""
echo "Currently recognized operating systems:"
echo ""
echo " FreeBSD v3.0 and v2.2"
echo " Solaris v2.5 under Sparc"
echo " RedHat v3.0"
echo ""
echo "Please contact scrappy@hub.org to see about rectifying this, "
echo "including the above 'checking host system type...' line "
echo "*************************************************************"
echo ""
exit;;
esac
AC_SUBST(PORTNAME)
AC_CONFIG_HEADER(include/config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
dnl ****************************************************************
dnl Hold off on the C++ stuff until we can figure out why it doesn't
dnl work under Solaris..
dnl
dnl AC_PROG_CXX
dnl
dnl Check if we should set Have_Cplusplus
dnl if test -n "$CXX"; then
dnl export HAVECXX
dnl HAVECXX='HAVE_Cplusplus=true'
dnl fi
dnl AC_SUBST(HAVECXX)
dnl ****************************************************************
HAVECXX='HAVE_Cplusplus=false'
AC_SUBST(HAVECXX)
dnl AC_PROG_INSTALL was broken on my machine (NAT), so here's an
dnl alternative, built from the various portname options
AC_PATH_PROG(INSTALL, install, /usr/bin:/usr/ucb:/home/tools/bin)
AC_PATH_PROG(BSDINST, bsdinst, /usr/bin/X11:/usr/X11R6/bin:/sbin)
INSTLOPTS="-m 444"
INSTL_EXE_OPTS="-m 555"
INSTL_LIB_OPTS="-m 664"
if test -n "$INSTALL"; then
INSTLOPTS="-c $INSTLOPTS"
INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS"
else
INSTALL=$BSDINST
fi
AC_SUBST(INSTALL)
AC_SUBST(INSTLOPTS)
AC_SUBST(INSTL_LIB_OPTS)
AC_SUBST(INSTL_EXE_OPTS)
dnl Check the option to echo to inhibit newlines.
ECHO_N_OUT=`echo -n "" | wc -c`
ECHO_C_OUT=`echo "\c" | wc -c`
if test "$ECHO_N_OUT" -eq 0; then
DASH_N='-n'
BACKSLASH_C=
else
if test "ECHO_C_OUT" -eq 0; then
DASH_N=
BACKSLASH_C= '\\\\c'
else
AC_MSG_ERROR("echo behaviour undetermined")
fi
fi
AC_SUBST(DASH_N)
AC_SUBST(BACKSLASH_C)
AC_PROG_LEX
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PATH_PROG(find, find)
AC_PATH_PROG(tar, tar)
AC_PATH_PROG(split, split)
AC_PATH_PROG(etags, etags)
AC_PATH_PROG(xargs, xargs)
AC_PATH_PROG(ipcs, ipcs)
AC_PATH_PROG(ipcrm, ipcrm)
dnl Checks for libraries.
dnl readline (used in psql if present)
dnl if the library readline is present,
dnl set the shell variable USE_READLINE
dnl to have the value USE_READLINE=true
dnl and substitute it into the makefiles
AC_CHECK_LIB(readline, main)
AC_CHECK_LIB(readline, write_history, AC_DEFINE(HAVE_HISTORY))
AC_CHECK_LIB(history, main)
AC_CHECK_LIB(curses, main)
AC_CHECK_LIB(termcap, main)
AC_CHECK_LIB(m, main)
AC_CHECK_LIB(dl, main)
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(ipc, main)
AC_CHECK_LIB(IPC, main)
AC_CHECK_LIB(lc, main)
AC_CHECK_LIB(dld, main)
AC_CHECK_LIB(ln, main)
AC_CHECK_LIB(bsd, main)
AC_CHECK_LIB(ld, main)
AC_CHECK_LIB(compat, main)
AC_CHECK_LIB(BSD, main)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
AC_CHECK_HEADERS(readline.h history.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
dnl Check for any "odd" conditions
AC_TRY_LINK([#include <time.h>],
[int res = timezone / 60; ], AC_DEFINE(HAVE_INT_TIMEZONE))
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
AC_OUTPUT(GNUmakefile Makefile.global)
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment