mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-02 01:40:49 +02:00
bash-4.0 remove leftover and stray files
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
#
|
||||
# Simple Makefile for the support programs.
|
||||
#
|
||||
# documentation support: man2html
|
||||
# testing support: printenv recho zecho
|
||||
#
|
||||
# bashbug lives here but is created by the top-level makefile
|
||||
#
|
||||
# Currently only man2html is built
|
||||
#
|
||||
# Copyright (C) 1998-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Boilerplate
|
||||
#
|
||||
topdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = .:@srcdir@
|
||||
BUILD_DIR = @BUILD_DIR@
|
||||
|
||||
RM = rm -f
|
||||
SHELL = @MAKE_SHELL@
|
||||
CC = @CC@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
|
||||
#
|
||||
# Compiler options:
|
||||
#
|
||||
PROFILE_FLAGS = @PROFILE_FLAGS@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
|
||||
LOCAL_CFLAGS = @LOCAL_CFLAGS@
|
||||
DEFS = @DEFS@
|
||||
LOCAL_DEFS = @LOCAL_DEFS@
|
||||
|
||||
LIBS = @LIBS@
|
||||
LIBS_FOR_BUILD = ${LIBS} # XXX
|
||||
|
||||
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
|
||||
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
|
||||
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
|
||||
|
||||
INCLUDES = -I${BUILD_DIR} -I${topdir}
|
||||
|
||||
BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \
|
||||
${INCLUDES} $(LOCAL_CFLAGS)
|
||||
|
||||
CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS)
|
||||
CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
|
||||
|
||||
SRC1 = man2html.c
|
||||
OBJ1 = man2html.o
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
$(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
|
||||
|
||||
all: man2html$(EXEEXT)
|
||||
|
||||
man2html$(EXEEXT): $(OBJ1)
|
||||
$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD}
|
||||
|
||||
clean:
|
||||
$(RM) man2html$(EXEEXT)
|
||||
|
||||
distclean maintainer-clean mostlyclean: clean
|
||||
$(RM) $(OBJ1)
|
||||
|
||||
man2html.o: man2html.c
|
||||
@@ -1,147 +0,0 @@
|
||||
/* bashversion.c -- Display bash version information. */
|
||||
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "stdc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "bashansi.h"
|
||||
|
||||
#include "version.h"
|
||||
#include "conftypes.h"
|
||||
|
||||
#define RFLAG 0x0001
|
||||
#define VFLAG 0x0002
|
||||
#define MFLAG 0x0004
|
||||
#define PFLAG 0x0008
|
||||
#define SFLAG 0x0010
|
||||
#define LFLAG 0x0020
|
||||
#define XFLAG 0x0040
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
extern char *dist_version;
|
||||
extern int patch_level;
|
||||
|
||||
extern char *shell_version_string __P((void));
|
||||
|
||||
char *shell_name = "bash";
|
||||
char *progname;
|
||||
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "%s: usage: %s [-hrvpmlsx]\n", progname, progname);
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int opt, oflags;
|
||||
char dv[128], *rv;
|
||||
|
||||
if (progname = strrchr (argv[0], '/'))
|
||||
progname++;
|
||||
else
|
||||
progname = argv[0];
|
||||
|
||||
oflags = 0;
|
||||
while ((opt = getopt(argc, argv, "hrvmpslx")) != EOF)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'h':
|
||||
usage ();
|
||||
exit (0);
|
||||
case 'r':
|
||||
oflags |= RFLAG; /* release */
|
||||
break;
|
||||
case 'v':
|
||||
oflags |= VFLAG; /* version */
|
||||
break;
|
||||
case 'm':
|
||||
oflags |= MFLAG; /* machtype */
|
||||
break;
|
||||
case 'p':
|
||||
oflags |= PFLAG; /* patchlevel */
|
||||
break;
|
||||
case 's': /* short version string */
|
||||
oflags |= SFLAG;
|
||||
break;
|
||||
case 'l': /* long version string */
|
||||
oflags |= LFLAG;
|
||||
break;
|
||||
case 'x': /* extended version information */
|
||||
oflags |= XFLAG;
|
||||
break;
|
||||
default:
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (argc > 0)
|
||||
{
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
|
||||
/* default behavior */
|
||||
if (oflags == 0)
|
||||
oflags = SFLAG;
|
||||
|
||||
if (oflags & (RFLAG|VFLAG))
|
||||
{
|
||||
strcpy (dv, dist_version);
|
||||
rv = strchr (dv, '.');
|
||||
if (rv)
|
||||
*rv++ = '\0';
|
||||
else
|
||||
rv = "00";
|
||||
}
|
||||
if (oflags & RFLAG)
|
||||
printf ("%s\n", dv);
|
||||
else if (oflags & VFLAG)
|
||||
printf ("%s\n", rv);
|
||||
else if (oflags & MFLAG)
|
||||
printf ("%s\n", MACHTYPE);
|
||||
else if (oflags & PFLAG)
|
||||
printf ("%d\n", patch_level);
|
||||
else if (oflags & SFLAG)
|
||||
printf ("%s\n", shell_version_string ());
|
||||
else if (oflags & LFLAG)
|
||||
show_shell_version (0);
|
||||
else if (oflags & XFLAG)
|
||||
show_shell_version (1);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
-1662
File diff suppressed because it is too large
Load Diff
@@ -1,127 +0,0 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# mail-shell -- mail out the shell
|
||||
#
|
||||
# usage: mail-shell -t tarball recipient
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@ins.CWRU.Edu
|
||||
#
|
||||
|
||||
# Copyright (C) 1995-2008 by Chester Ramey
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin/gnu:/usr/local/bin:.
|
||||
|
||||
trap 'rm -f x?? ${UUFILE}' 0 1 2 3 6 15
|
||||
|
||||
prog=`basename $0`
|
||||
|
||||
TARFILE=bash.tar
|
||||
VERS=2.05b
|
||||
|
||||
while getopts t: opt
|
||||
do
|
||||
case $opt in
|
||||
t) TARFILE=$OPTARG ;;
|
||||
*) echo usage: $prog [ -t tarfile ] recipient 1>&2
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(( $OPTIND - 1 ))
|
||||
|
||||
case "$TARFILE" in
|
||||
bash-*.tar) VERS=${TARFILE%%.tar} ; VERS=${VERS#bash-} ;;
|
||||
esac
|
||||
|
||||
GZFILE=${TARFILE}.gz
|
||||
UUFILE=${GZFILE}.uu
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo usage: $0 recipient
|
||||
exit 1
|
||||
fi
|
||||
|
||||
recip=$1
|
||||
i=1
|
||||
|
||||
if [ ! -f ${TARFILE} ] && [ ! -f ${GZFILE} ]; then
|
||||
echo "$prog: no file ${TARFILE}, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f ${GZFILE} ] ; then
|
||||
echo "$prog: no gzipped tar file ${GZFILE}"
|
||||
echo "$prog: gzipping ${TARFILE}"
|
||||
gzip ${TARFILE}
|
||||
fi
|
||||
|
||||
if [ ! -f ${UUFILE} ] ; then
|
||||
echo "$prog: no uuencoded tar file ${UUFILE}"
|
||||
echo "$prog: uuencoding ${GZFILE}"
|
||||
uuencode ${GZFILE} < ${GZFILE} > ${UUFILE}
|
||||
fi
|
||||
|
||||
files=$(echo x??)
|
||||
|
||||
if [ "$files" = 'x??' ] ; then
|
||||
echo "$prog: no split of ${UUFILE} exists"
|
||||
echo "$prog: splitting ${UUFILE}"
|
||||
split ${UUFILE}
|
||||
fi
|
||||
|
||||
count()
|
||||
{
|
||||
echo $#
|
||||
}
|
||||
|
||||
parts=$(count x??)
|
||||
|
||||
if [ -x /usr/ucb/mail ]; then
|
||||
MAIL=/usr/ucb/mail
|
||||
elif [ -x /usr/ucb/Mail ]; then
|
||||
MAIL=/usr/ucb/Mail
|
||||
elif [ -x /usr/bin/mailx ]; then
|
||||
MAIL=/usr/bin/mailx
|
||||
elif [ -x /usr/bin/mail ]; then
|
||||
MAIL=/usr/bin/mail
|
||||
else
|
||||
MAIL=/bin/mail
|
||||
fi
|
||||
|
||||
$MAIL -s "bash-${VERS} shipment coming" $recip <<EOF
|
||||
|
||||
Hi. Here is version ${VERS} of bash. Expect $parts messages.
|
||||
Each is part of a uuencoded tar file of the bash sources. When
|
||||
you get all $parts messages, cat them all together into the file
|
||||
${UUFILE}, and run uudecode on this file. You will have a
|
||||
gzipped tar file named ${GZFILE}. gunzip it, cd into a source
|
||||
directory (the tar archive extracts into its own directory), and
|
||||
untar.
|
||||
|
||||
Chet
|
||||
EOF
|
||||
|
||||
for file in x??
|
||||
do
|
||||
echo mailing part $i to $recip
|
||||
/usr/ucb/mail -s "${UUFILE} part $i of $parts" $recip < $file
|
||||
i=$(( $i + 1 ))
|
||||
done
|
||||
|
||||
exit 0
|
||||
@@ -1,166 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Simple program to make new version numbers for the shell.
|
||||
# Big deal, but it was getting out of hand to do everything
|
||||
# in the makefile. This creates a file named by the -o option,
|
||||
# otherwise everything is echoed to the standard output.
|
||||
|
||||
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-b] [-S srcdir] -d version -p patchlevel [-s status] [-o outfile]"
|
||||
|
||||
source_dir="."
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-o) shift; OUTFILE=$1; shift ;;
|
||||
-b) shift; inc_build=yes ;;
|
||||
-s) shift; rel_status=$1; shift ;;
|
||||
-p) shift; patch_level=$1; shift ;;
|
||||
-d) shift; dist_version=$1; shift ;;
|
||||
-S) shift; source_dir="$1"; shift ;;
|
||||
*) echo "$PROGNAME: usage: $USAGE" >&2 ; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Required arguments
|
||||
if [ -z "$dist_version" ]; then
|
||||
echo "${PROGNAME}: required argument -d missing" >&2
|
||||
echo "$PROGNAME: usage: $USAGE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#if [ -z "$patch_level" ]; then
|
||||
# echo "${PROGNAME}: required argument -p missing" >&2
|
||||
# echo "$PROGNAME: usage: $USAGE" >&2
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
# Defaults
|
||||
if [ -z "$rel_status" ]; then
|
||||
rel_status="release"
|
||||
fi
|
||||
|
||||
build_ver=
|
||||
if [ -r .build ]; then
|
||||
build_ver=`cat .build`
|
||||
fi
|
||||
if [ -z "$build_ver" ]; then
|
||||
build_ver=0
|
||||
fi
|
||||
|
||||
# increment the build version if that's what's required
|
||||
|
||||
if [ -n "$inc_build" ]; then
|
||||
build_ver=`expr 1 + $build_ver`
|
||||
fi
|
||||
|
||||
# what's the patch level?
|
||||
if [ -z "$patch_level" ]; then
|
||||
patchlevel_h=$source_dir/patchlevel.h
|
||||
if [ -s $patchlevel_h ]; then
|
||||
patch_level=`cat $patchlevel_h | grep '^#define[ ]*PATCHLEVEL' | awk '{print $NF}'`
|
||||
fi
|
||||
fi
|
||||
if [ -z "$patch_level" ]; then
|
||||
patch_level=0
|
||||
fi
|
||||
|
||||
# If we have an output file specified, make it the standard output
|
||||
if [ -n "$OUTFILE" ]; then
|
||||
if exec >$OUTFILE; then
|
||||
:
|
||||
else
|
||||
echo "${PROGNAME}: cannot redirect standard output to $OUTFILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Output the leading comment.
|
||||
echo "/* Version control for the shell. This file gets changed when you say"
|
||||
echo " \`make version.h' to the Makefile. It is created by mkversion. */"
|
||||
|
||||
# Output the distribution version. Single numbers are converted to x.00.
|
||||
# Allow, as a special case, `[:digit:].[:digit:][:alpha:]' for
|
||||
# intermediate versions (e.g., `2.5a').
|
||||
# Any characters other than digits and `.' are invalid.
|
||||
case "$dist_version" in
|
||||
[0-9].[0-9][a-z]) ;; # special case
|
||||
*[!0-9.]*) echo "mkversion.sh: ${dist_version}: bad distribution version" >&2
|
||||
exit 1 ;;
|
||||
*.*) ;;
|
||||
*) dist_version=${dist_version}.00 ;;
|
||||
esac
|
||||
|
||||
dist_major=`echo $dist_version | sed 's:\..*$::'`
|
||||
[ -z "${dist_major}" ] && dist_major=0
|
||||
|
||||
dist_minor=`echo $dist_version | sed 's:^.*\.::'`
|
||||
case "$dist_minor" in
|
||||
"") dist_minor=0 ;;
|
||||
[a-z]) dist_minor=0${dist_minor} ;;
|
||||
?) dist_minor=${dist_minor} ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
#float_dist=`echo $dist_version | awk '{printf "%.2f\n", $1}'`
|
||||
float_dist=${dist_major}.${dist_minor}
|
||||
|
||||
echo
|
||||
echo "/* The distribution version number of this shell. */"
|
||||
echo "#define DISTVERSION \"${float_dist}\""
|
||||
|
||||
# Output the patch level
|
||||
#echo
|
||||
#echo "/* The patch level of this version of the shell. */"
|
||||
#echo "#define PATCHLEVEL ${patch_level}"
|
||||
|
||||
# Output the build version
|
||||
echo
|
||||
echo "/* The last built version of this shell. */"
|
||||
echo "#define BUILDVERSION ${build_ver}"
|
||||
|
||||
# Output the release status
|
||||
echo
|
||||
echo "/* The release status of this shell. */"
|
||||
echo "#define RELSTATUS \"${rel_status}\""
|
||||
|
||||
echo "#define DEFAULT_COMPAT_LEVEL ${dist_major}${dist_minor}"
|
||||
|
||||
# Output the SCCS version string
|
||||
sccs_string="${float_dist}.${patch_level}(${build_ver}) ${rel_status} GNU"
|
||||
echo
|
||||
echo "/* A version string for use by sccs and the what command. */"
|
||||
echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\""
|
||||
|
||||
# extern function declarations
|
||||
#echo
|
||||
#echo '/* Functions from version.c. */'
|
||||
#echo 'extern char *shell_version_string __P((void));'
|
||||
#echo 'extern void show_shell_version __P((int));'
|
||||
|
||||
if [ -n "$inc_build" ]; then
|
||||
# Make sure we can write to .build
|
||||
if [ -f .build ] && [ ! -w .build ]; then
|
||||
echo "$PROGNAME: cannot write to .build, not incrementing build version" >&2
|
||||
else
|
||||
echo "$build_ver" > .build
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,568 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# shobj-conf -- output a series of variable assignments to be substituted
|
||||
# into a Makefile by configure which specify system-dependent
|
||||
# information for creating shared objects that may be loaded
|
||||
# into bash with `enable -f'
|
||||
#
|
||||
# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
|
||||
# Copyright (C) 1996-2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Bash, the Bourne Again SHell.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# defaults
|
||||
#
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CC=cc
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=
|
||||
SHOBJ_LDFLAGS=
|
||||
SHOBJ_XLDFLAGS=
|
||||
SHOBJ_LIBS=
|
||||
|
||||
SHLIB_XLDFLAGS=
|
||||
SHLIB_LIBS=
|
||||
|
||||
SHLIB_DOT='.'
|
||||
SHLIB_LIBPREF='lib'
|
||||
SHLIB_LIBSUFF='so'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
|
||||
SHLIB_DLLVERSION='$(SHLIB_MAJOR)'
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-C) shift; SHOBJ_CC="$1"; shift ;;
|
||||
-c) shift; host_cpu="$1"; shift ;;
|
||||
-o) shift; host_os="$1"; shift ;;
|
||||
-v) shift; host_vendor="$1"; shift ;;
|
||||
*) echo "$USAGE" >&2 ; exit 2;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${host_os}-${SHOBJ_CC}" in
|
||||
sunos4*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
SHOBJ_CFLAGS=-pic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos5*-*gcc*|solaris2*-*gcc*)
|
||||
SHOBJ_LD='${CC}'
|
||||
ld_used=`gcc -print-prog-name=ld`
|
||||
if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then
|
||||
# This line works for the GNU ld
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
|
||||
# http://sourceware.org/ml/binutils/2001-08/msg00361.html
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
else
|
||||
# This line works for the Solaris linker in /usr/ccs/bin/ld
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
fi
|
||||
|
||||
# SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sunos5*|solaris2*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=/usr/ccs/bin/ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -i -h $@'
|
||||
|
||||
# SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
# All versions of Linux or the semi-mythical GNU Hurd.
|
||||
linux*-*|gnu*-*|k*bsd*-gnu-*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
freebsd2*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-x -Bshareable'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
# FreeBSD-3.x ELF
|
||||
freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
else
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
fi
|
||||
;;
|
||||
|
||||
# Darwin/MacOS X
|
||||
darwin[89]*)
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CFLAGS='-fno-common'
|
||||
|
||||
SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
|
||||
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
|
||||
;;
|
||||
|
||||
darwin*|macosx*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CFLAGS='-fno-common'
|
||||
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
case "${host_os}" in
|
||||
darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
*) SHOBJ_LDFLAGS='-dynamic'
|
||||
SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
esac
|
||||
|
||||
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
|
||||
;;
|
||||
|
||||
openbsd*|netbsd*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
bsdi2*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.2.1.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi3*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.3.0.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
# BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
|
||||
# shared libraries. gcc 2.x is the standard compiler, and the
|
||||
# `normal' gcc options should work as they do in Linux.
|
||||
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
osf*-*gcc*)
|
||||
# Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
osf*)
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*|aix[5-9].*)
|
||||
SHOBJ_CFLAGS=-K
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
#
|
||||
# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
|
||||
#
|
||||
irix[56]*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
irix[56]*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
# SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
|
||||
# Change from David Kaelbling <drk@sgi.com>. If you have problems,
|
||||
# remove the `-no_unresolved'
|
||||
SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
hpux10*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
# if you have problems linking here, moving the `-Wl,+h,$@' from
|
||||
# SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work
|
||||
SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux10*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s +h $@'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
hpux11*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
|
||||
SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux11*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s +h $@'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
sysv4*-*gcc*)
|
||||
SHOBJ_CFLAGS=-shared
|
||||
SHOBJ_LDFLAGS='-shared -h $@'
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv4*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-dy -z text -G -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
SHOBJ_CFLAGS='-K pic -b elf'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5UnixWare*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5UnixWare*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5OpenUNIX*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5OpenUNIX*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
msdos*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
cygwin*)
|
||||
SHOBJ_LD='$(CC)'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
|
||||
SHLIB_LIBPREF='cyg'
|
||||
SHLIB_LIBSUFF='dll'
|
||||
SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBS='$(TERMCAP_LIB)'
|
||||
|
||||
SHLIB_DOT=
|
||||
# For official cygwin releases, DLLVERSION will be defined in the
|
||||
# environment of configure, and will be incremented any time the API
|
||||
# changes in a non-backwards compatible manner. Otherwise, it is just
|
||||
# SHLIB_MAJOR.
|
||||
if [ -n "$DLLVERSION" ] ; then
|
||||
SHLIB_DLLVERSION="$DLLVERSION"
|
||||
fi
|
||||
;;
|
||||
|
||||
mingw*)
|
||||
SHOBJ_LD='$(CC)'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
|
||||
SHLIB_LIBSUFF='dll'
|
||||
SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBS='$(TERMCAP_LIB)'
|
||||
|
||||
SHLIB_DOT=
|
||||
# For official cygwin releases, DLLVERSION will be defined in the
|
||||
# environment of configure, and will be incremented any time the API
|
||||
# changes in a non-backwards compatible manner. Otherwise, it is just
|
||||
# SHLIB_MAJOR.
|
||||
if [ -n "$DLLVERSION" ] ; then
|
||||
SHLIB_DLLVERSION="$DLLVERSION"
|
||||
fi
|
||||
;;
|
||||
|
||||
#
|
||||
# Rely on correct gcc configuration for everything else
|
||||
#
|
||||
*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo SHOBJ_CC=\'"$SHOBJ_CC"\'
|
||||
echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\'
|
||||
echo SHOBJ_LD=\'"$SHOBJ_LD"\'
|
||||
echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\'
|
||||
echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\'
|
||||
echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
|
||||
|
||||
echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
|
||||
echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
|
||||
|
||||
echo SHLIB_DOT=\'"$SHLIB_DOT"\'
|
||||
|
||||
echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\'
|
||||
echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
|
||||
|
||||
echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
|
||||
echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\'
|
||||
|
||||
echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
|
||||
echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
|
||||
|
||||
exit 0
|
||||
@@ -1,92 +0,0 @@
|
||||
/* xcase - change uppercase characters to lowercase or vice versa. */
|
||||
|
||||
/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define LOWER 1
|
||||
#define UPPER 2
|
||||
|
||||
main(ac, av)
|
||||
int ac;
|
||||
char **av;
|
||||
{
|
||||
int c, x;
|
||||
int op;
|
||||
FILE *inf;
|
||||
|
||||
op = 0;
|
||||
while ((c = getopt(ac, av, "lnu")) != EOF) {
|
||||
switch (c) {
|
||||
case 'n':
|
||||
setbuf (stdout, (char *)NULL);
|
||||
break;
|
||||
case 'u':
|
||||
op = UPPER;
|
||||
break;
|
||||
case 'l':
|
||||
op = LOWER;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "casemod: usage: casemod [-lnu] [file]\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
av += optind;
|
||||
ac -= optind;
|
||||
|
||||
if (av[0] && (av[0][0] != '-' || av[0][1])) {
|
||||
inf = fopen(av[0], "r");
|
||||
if (inf == 0) {
|
||||
fprintf(stderr, "casemod: %s: cannot open: %s\n", av[0], strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
} else
|
||||
inf = stdin;
|
||||
|
||||
while ((c = getc(inf)) != EOF) {
|
||||
switch (op) {
|
||||
case UPPER:
|
||||
x = islower(c) ? toupper(c) : c;
|
||||
break;
|
||||
case LOWER:
|
||||
x = isupper(c) ? tolower(c) : c;
|
||||
break;
|
||||
default:
|
||||
x = c;
|
||||
break;
|
||||
}
|
||||
putchar(x);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
Reference in New Issue
Block a user