libcody: Simplify configure [PR 98414, 98509]
Libcody's configurey was overly 'clever'. That didn't play well with GCC's structure. This removes lots of that overengineering, using libcpp as an example. libcody/ * Makefile.in: Remove auto parallelize, swallow Makesub.in. Don't check compiler name here. * Makesub.in: Delete. * build-aux/config.guess: Delete. * build-aux/config.sub: Delete. * build-aux/install-sh: Delete. * dox.cfg.in: Delete. * gdbinit.in: Delete. * internal.hh (BuildNote): Delete. * fatal.cc (BuildNote): Delete. * config.m4: Remove unneeded fns. * configure.ac: Remove unneccessary checks and configures. * configure: Rebuilt. * config.h.in: Rebuilt.
This commit is contained in:
parent
248feb2fa2
commit
e2aa8a5f98
@ -2,48 +2,15 @@
|
||||
# Copyright (C) 2019-2020 Nathan Sidwell, nathan@acm.org
|
||||
# License: Apache v2.0
|
||||
|
||||
ifeq (0,$(MAKELEVEL))
|
||||
ifneq (,@tools@)
|
||||
$(info Prepending @tools@/bin to PATH)
|
||||
PATH := @tools@/bin:$(PATH)
|
||||
export PATH
|
||||
endif
|
||||
ifeq (,$(SERIAL))
|
||||
# Figure out if we should set parallelism
|
||||
ifeq (,$(filter clean%,$(MAKECMDGOALS)))
|
||||
PARALLELISM := @NUM_CPUS@
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (00,$(MAKELEVEL)$(if $(PARALLELISM),0,1))
|
||||
# Although Make 4.3 documentation suggests I can set parallelism just
|
||||
# by appending to MAKEFLAGS, it doesn't seem to work. It's also not
|
||||
# possible to figure out the current Make invocation's parallelism,
|
||||
# the -j option doesn't appear in MAKEFLAGS and is magically inserted
|
||||
# when that is expanded in a rule. I can't figure how to get a rule
|
||||
# expansion into a variable to test. Fortunately, Make propagates an
|
||||
# incoming -j option rather than the one you attempted to append
|
||||
$(info Parallelizing $(PARALLELISM) ways)
|
||||
MAKEFLAGS += -j$(PARALLELISM)
|
||||
ifneq (,$(MAKECMDGOALS))
|
||||
$(MAKECMDGOALS): recurse
|
||||
endif
|
||||
recurse:
|
||||
$(MAKE) -r$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||
.PHONY: recurse
|
||||
else
|
||||
|
||||
srcdir := @srcdir@
|
||||
prefix := @prefix@
|
||||
exec_prefix := @exec_prefix@
|
||||
bindir := @bindir@
|
||||
libdir := @libdir@
|
||||
includedir := @includedir@
|
||||
SUBDIRS := @SUBDIRS@
|
||||
# autoconf doesn't seem to like setting SHELL
|
||||
SHELL := $(shell which zsh 2>/dev/null >/dev/null && echo zsh \
|
||||
|| (echo "No ZSH, maybe flakey" >&2 && echo sh))
|
||||
# Linker options
|
||||
LDFLAGS := @LDFLAGS@
|
||||
LIBS := @LIBS@
|
||||
|
||||
# We have to place the -I paths last, so that building will see -I paths to us
|
||||
CXX := $(filter-out -I%,@CXX@)
|
||||
@ -55,46 +22,10 @@ INSTALL := $(srcdir)/build-aux/install-sh
|
||||
CXXFLAGS := @CXXFLAGS@
|
||||
CXXINC := $(filter -I%,@CXX@)
|
||||
CXXOPTS := $(CXXFLAGS) @PICFLAG@
|
||||
ifeq ($(notdir $(firstword $(CXX))),g++)
|
||||
# It's GCC, or pretending to be it -- so it better smell like it!
|
||||
# Code generation
|
||||
CXXOPTS += -fno-enforce-eh-specs
|
||||
CXXOPTS += -fno-stack-protector -fno-threadsafe-statics
|
||||
|
||||
ifneq (@EXCEPTIONS@,yes)
|
||||
CXXOPTS += -fno-exceptions -fno-rtti
|
||||
endif
|
||||
ifeq ($(filter -fdebug-prefix-map=%,$(CXXOPTS)),)
|
||||
CXXOPTS += -fdebug-prefix-map=${srcdir}/=
|
||||
endif
|
||||
# Warning options
|
||||
CXXOPTS += -W -Wall
|
||||
ifeq (no,)
|
||||
# just turn off for now
|
||||
CXXOPTS += -Woverloaded-virtual -Wshadow
|
||||
CXXOPTS += -Wno-invalid-offsetof -Wno-unused-variable
|
||||
CXXOPTS += -Wno-missing-field-initializers
|
||||
# Diagnostic options, look at controlling terminal so that piping
|
||||
# through more works
|
||||
MLEN := $(shell stty size </dev/tty 2>/dev/null | cut -d' ' -f2)
|
||||
ifneq (,$(MLEN))
|
||||
CXXOPTS += -fmessage-length=$(MLEN)
|
||||
endif
|
||||
CXXOPTS += -fdiagnostics-color=always -fno-diagnostics-show-option
|
||||
endif
|
||||
else
|
||||
ifeq ($(notdir $(firstword $(CXX))),clang++)
|
||||
CXXOPTS += -fno-stack-protector -fno-threadsafe-statics
|
||||
ifneq (@EXCEPTIONS@,yes)
|
||||
CXXOPTS += -fno-exceptions -fno-rtti
|
||||
endif
|
||||
# Warning options
|
||||
CXXOPTS += -W -Wall -Woverloaded-virtual -Wshadow
|
||||
CXXOPTS += -Wno-invalid-offsetof -Wno-unused-variable
|
||||
CXXOPTS += -Wno-missing-field-initializers
|
||||
else
|
||||
# Add different compiler's options here
|
||||
endif
|
||||
endif
|
||||
|
||||
# Config
|
||||
CXXOPTS += $(filter-out -DHAVE_CONFIG_H,@DEFS@) -include config.h
|
||||
@ -127,13 +58,12 @@ vpath %.cc $(srcdir)
|
||||
$(CXX) $(strip $(CXXOPTS) $(call SRC_CXXFLAGS,$<) $(CXXINC)) \
|
||||
-MMD -MP -MF ${@:.o=.d} -c -o $@ $<
|
||||
|
||||
all:: Makefile $(addprefix all.,$(SUBDIRS))
|
||||
all:: Makefile
|
||||
|
||||
check:: Makefile $(addprefix check.,$(SUBDIRS))
|
||||
clean:: Makefile
|
||||
|
||||
clean:: Makefile $(addprefix clean.,$(SUBDIRS))
|
||||
|
||||
revision.stamp: $(addprefix $(srcdir)/,. $(SUBDIRS))
|
||||
# FIXME: Delete
|
||||
revision.stamp: $(srcdir)/.
|
||||
@revision=$$(git -C $(srcdir) rev-parse HEAD 2>/dev/null) ;\
|
||||
if test -n "$$revision" ;\
|
||||
then revision=git-$$revision ;\
|
||||
@ -152,14 +82,11 @@ clean::
|
||||
|
||||
distclean:: clean
|
||||
rm -f config.log config.status
|
||||
rm -rf $(SUBDIRS)
|
||||
|
||||
$(srcdir)/configure: $(srcdir)/configure.ac \
|
||||
$(patsubst %,$(srcdir)/%/config.m4,. $(SUBDIRS))
|
||||
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/config.m4
|
||||
$(call MAINTAINER,$@,cd $(@D) && autoconf -W all,error)
|
||||
|
||||
$(srcdir)/config.h.in: $(srcdir)/configure.ac \
|
||||
$(patsubst %,$(srcdir)/%/config.m4,. $(SUBDIRS))
|
||||
$(srcdir)/config.h.in: $(srcdir)/configure.ac $(srcdir)/config.m4
|
||||
$(call MAINTAINER,$@,cd $(@D) && autoheader -f -W all,error)
|
||||
|
||||
config.h: config.status config.h.in
|
||||
@ -167,7 +94,7 @@ config.h: config.status config.h.in
|
||||
touch $@
|
||||
|
||||
ifeq ($(filter %clean,$(MAKECMDGOALS)),)
|
||||
@CONFIG_FILES@: %: config.status %.in
|
||||
Makefile: config.status Makefile.in
|
||||
./$< --file=$@
|
||||
touch $@
|
||||
endif
|
||||
@ -186,7 +113,29 @@ clean::
|
||||
|
||||
.PHONY: all check clean distclean maintainer-clean
|
||||
|
||||
-include $(addsuffix /Makesub,. $(SUBDIRS))
|
||||
-include $(addsuffix /tests/Makesub,. $(SUBDIRS))
|
||||
CXXFLAGS/ := -I$(srcdir)
|
||||
LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \
|
||||
resolver.o packet.o server.o
|
||||
|
||||
all:: libcody.a
|
||||
|
||||
libcody.a: $(LIBCODY.O)
|
||||
$(AR) -cr $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
clean::
|
||||
rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d)
|
||||
rm -f libcody.a
|
||||
|
||||
CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"'
|
||||
|
||||
fatal.o: Makefile revision
|
||||
|
||||
install::
|
||||
$(INSTALL) -d $(libdir) $(includedir)
|
||||
$(INSTALL) libcody.a $(libdir)
|
||||
$(INSTALL) $(srcdir)/cody.hh $(includedir)
|
||||
|
||||
ifeq ($(filter clean%,$(MAKECMDGOALS)),)
|
||||
-include $(LIBCODY.O:.o=.d)
|
||||
endif
|
||||
|
@ -1,49 +0,0 @@
|
||||
# CODYlib -*- mode:Makefile -*-
|
||||
# Copyright (C) 2019-2020 Nathan Sidwell, nathan@acm.org
|
||||
# License: Apache v2.0
|
||||
|
||||
DOXYGEN := @DOXYGEN@
|
||||
CXXFLAGS/ := -I$(srcdir)
|
||||
LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \
|
||||
resolver.o packet.o server.o
|
||||
|
||||
all:: .gdbinit
|
||||
|
||||
.gdbinit: gdbinit
|
||||
rm -f $@ ; ln -s $< $@
|
||||
|
||||
clean::
|
||||
rm -f gdbinit .gdbinit
|
||||
|
||||
all:: libcody.a
|
||||
|
||||
libcody.a: $(LIBCODY.O)
|
||||
$(AR) -cr $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
clean::
|
||||
rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d)
|
||||
rm -f libcody.a
|
||||
|
||||
CXXFLAGS/fatal.cc = -DREVISION='"$(shell cat revision)"' -DSRCDIR='"$(srcdir)"'
|
||||
|
||||
fatal.o: Makefile revision
|
||||
|
||||
doc:: dox.cfg
|
||||
ifneq ($(DOXYGEN),:)
|
||||
cd $(<D); $(DOXYGEN) $(<F) >&dox.log
|
||||
else
|
||||
@echo "doxygen not present, documentation not built"
|
||||
endif
|
||||
|
||||
clean::
|
||||
rm -rf dox dox.log
|
||||
|
||||
install::
|
||||
$(INSTALL) -d $(libdir) $(includedir)
|
||||
$(INSTALL) libcody.a $(libdir)
|
||||
$(INSTALL) $(srcdir)/cody.hh $(includedir)
|
||||
|
||||
ifeq ($(filter clean%,$(MAKECMDGOALS)),)
|
||||
-include $(LIBCODY.O:.o=.d)
|
||||
endif
|
1476
libcody/build-aux/config.guess
vendored
1476
libcody/build-aux/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1833
libcody/build-aux/config.sub
vendored
1833
libcody/build-aux/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@ -1,518 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# 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.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p' feature.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# 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 $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,9 +1,6 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Bug reporting location */
|
||||
#undef BUGURL
|
||||
|
||||
/* Enable checking */
|
||||
/* Define to 1 if you want more run-time sanity checks. */
|
||||
#undef NMS_CHECKING
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
|
@ -4,53 +4,6 @@
|
||||
|
||||
# Note: VAR+=... is not dashing, despite its looks
|
||||
|
||||
AC_DEFUN([NMS_NOT_IN_SOURCE],
|
||||
[if test -e configure ; then
|
||||
AC_MSG_ERROR([Do not build in the source tree. Reasons])
|
||||
fi])
|
||||
|
||||
# thanks to Zack Weinberg for fixing this!
|
||||
AC_DEFUN([NMS_TOOLS],
|
||||
[AC_SUBST([tools], [])
|
||||
AC_ARG_WITH([tools],
|
||||
AS_HELP_STRING([--with-tools=DIR],[tool directory]),
|
||||
[AS_CASE([$withval],
|
||||
[yes], [AC_MSG_ERROR([--with-tools requires an argument])],
|
||||
[no], [:],
|
||||
[tools="${withval%/bin}"])])
|
||||
|
||||
if test -n "$tools" ; then
|
||||
if test -d "$tools/bin"; then
|
||||
PATH="$tools/bin:$PATH"
|
||||
AC_MSG_NOTICE([Using tools in $tools])
|
||||
else
|
||||
AC_MSG_ERROR([tool location does not exist])
|
||||
fi
|
||||
fi])
|
||||
|
||||
AC_DEFUN([NMS_TOOL_DIRS],
|
||||
[if test "$tools" && test -d "$tools/include" ; then
|
||||
CXX="$CXX -I$tools/include"
|
||||
fi
|
||||
if test "$tools" && test -d "$tools/lib" ; then
|
||||
toollib="$tools/lib"
|
||||
if os=$(CXX -print-multi-os-directory 2>/dev/null) ; then
|
||||
toollib="$toollib/${os}"
|
||||
fi
|
||||
LDFLAGS="$LDFLAGS -L $toollib"
|
||||
unset toollib
|
||||
fi])
|
||||
|
||||
AC_DEFUN([NMS_NUM_CPUS],
|
||||
[AC_MSG_CHECKING([number of CPUs])
|
||||
AS_CASE([$build],
|
||||
[*-*-darwin*], [NUM_CPUS=$(sysctl -n hw.ncpu 2>/dev/null)],
|
||||
[NUM_CPUS=$(grep -c '^processor' /proc/cpuinfo 2>/dev/null)])
|
||||
test "$NUM_CPUS" = 0 && NUM_CPUS=
|
||||
AC_MSG_RESULT([${NUM_CPUS:-unknown}])
|
||||
test "$NUM_CPUS" = 1 && NUM_CPUS=
|
||||
AC_SUBST(NUM_CPUS)])
|
||||
|
||||
AC_DEFUN([NMS_MAINTAINER_MODE],
|
||||
[AC_ARG_ENABLE([maintainer-mode],
|
||||
AS_HELP_STRING([--enable-maintainer-mode],
|
||||
@ -105,56 +58,6 @@ AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([C++11 is required])]))
|
||||
unset CXX_ORIG])])
|
||||
|
||||
AC_DEFUN([NMS_CXX_20],
|
||||
[AC_MSG_CHECKING([whether $CXX is for C++20])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||
[#if __cplusplus <= 201703
|
||||
#error "C++20 is required"
|
||||
#endif
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[CXX="$CXX -std=c++20"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||
[#if __cplusplus <= 201703
|
||||
#error "C++20 is required"
|
||||
#endif
|
||||
]])],
|
||||
AC_MSG_RESULT([adding -std=c++20]),
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([C++20 is required])]))
|
||||
|
||||
AC_MSG_CHECKING([whether C++20 support is sufficiently advanced])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <version>
|
||||
// There doesn't seem to be a feature macro for __VA_OPT__ :(
|
||||
#define VARIADIC(X,...) X __VA_OPT__((__VA_ARGS__))
|
||||
#define X(Y,Z) 1
|
||||
int ary[VARIADIC(X,Y,Z)];
|
||||
#if __cpp_constinit < 201907
|
||||
#error "C++20 constinit required"
|
||||
cpp_constinit is __cpp_constinit
|
||||
#endif
|
||||
#if __cpp_if_constexpr < 201606
|
||||
#error "C++20 constexpr required"
|
||||
cpp_constexpr is __cpp_if_constexpr
|
||||
#endif
|
||||
#if __cpp_concepts < 201907
|
||||
#error "C++20 concepts required"
|
||||
cpp_concepts is __cpp_concepts
|
||||
#endif
|
||||
#if __cpp_structured_bindings < 201606
|
||||
#error "C++20 structured bindings required"
|
||||
cpp_structured_bindings is __cpp_structured_bindings
|
||||
#endif
|
||||
#if __cpp_lib_int_pow2 < 202002
|
||||
#error "std::has_single_bit required"
|
||||
cpp_lib_int_pow2 is __cpp_lib_int_pow2
|
||||
#endif
|
||||
]])],
|
||||
AC_MSG_RESULT([yes 🙂]),
|
||||
AC_MSG_RESULT([no 🙁])
|
||||
AC_MSG_ERROR([C++20 support is too immature]))])
|
||||
|
||||
AC_DEFUN([NMS_ENABLE_EXCEPTIONS],
|
||||
[AC_ARG_ENABLE([exceptions],
|
||||
AS_HELP_STRING([--enable-exceptions],
|
||||
@ -181,30 +84,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
|
||||
AC_MSG_RESULT([no])])
|
||||
unset ORIG_LDFLAGS])
|
||||
|
||||
AC_DEFUN([NMS_BUGURL],
|
||||
[AC_MSG_CHECKING([bugurl])
|
||||
AC_ARG_WITH(bugurl,
|
||||
AS_HELP_STRING([--with-bugurl=URL],[where to report bugs]),
|
||||
AS_CASE(["$withval"],
|
||||
[yes], [AC_MSG_ERROR([--with-bugurl requires an argument])],
|
||||
[no], [BUGURL=""],
|
||||
[BUGURL="${withval}"]),
|
||||
[BUGURL="${PACKAGE_BUGREPORT}"])
|
||||
AC_MSG_RESULT($BUGURL)
|
||||
AC_DEFINE_UNQUOTED(BUGURL,"$BUGURL",[Bug reporting location])])
|
||||
|
||||
AC_DEFUN([NMS_DISTRIBUTION],
|
||||
[AC_ARG_ENABLE([distribution],
|
||||
AS_HELP_STRING([--enable-distribution],
|
||||
[enable distribution. Inhibit components that prevent distribution]),,
|
||||
[enable_distribution="no"])
|
||||
AS_CASE([$enable_distribution],
|
||||
[yes], [nms_distribution=yes],
|
||||
[no], [nms_distribution=no],
|
||||
[AC_MSG_ERROR([unknown distribution $enable_distribution])])
|
||||
AC_MSG_CHECKING([distribution])
|
||||
AC_MSG_RESULT([$nms_distribution])])
|
||||
|
||||
AC_DEFUN([NMS_ENABLE_CHECKING],
|
||||
[AC_ARG_ENABLE([checking],
|
||||
AS_HELP_STRING([--enable-checking],
|
||||
@ -219,64 +98,3 @@ AC_MSG_RESULT([${nms_checking:-no}])
|
||||
if test "$nms_checking" = yes ; then
|
||||
AC_DEFINE_UNQUOTED([NMS_CHECKING], [0${nms_checking:+1}], [Enable checking])
|
||||
fi])
|
||||
|
||||
AC_DEFUN([NMS_WITH_BINUTILS],
|
||||
[AC_MSG_CHECKING([binutils])
|
||||
AC_ARG_WITH(bfd,
|
||||
AS_HELP_STRING([--with-bfd=DIR], [location of libbfd]),
|
||||
if test "$withval" = "yes" ; then
|
||||
AC_MSG_ERROR([DIR not specified])
|
||||
elif test "$withval" = "no" ; then
|
||||
AC_MSG_RESULT(installed)
|
||||
else
|
||||
AC_MSG_RESULT(${withval})
|
||||
CPPFLAGS="$CPPFLAGS -I${withval}/include"
|
||||
LDFLAGS="$LDFLAGS -L${withval}/lib"
|
||||
fi,
|
||||
AC_MSG_RESULT(installed))])
|
||||
|
||||
AC_DEFUN([NMS_ENABLE_BACKTRACE],
|
||||
[AC_REQUIRE([NMS_DISTRIBUTION])
|
||||
AC_ARG_ENABLE([backtrace],
|
||||
AS_HELP_STRING([--enable-backtrace],[provide backtrace on fatality.]),,
|
||||
[enable_backtrace="maybe"])
|
||||
if test "${enable_backtrace:-maybe}" != no ; then
|
||||
AC_CHECK_HEADERS(execinfo.h)
|
||||
AC_CHECK_FUNCS(backtrace)
|
||||
if test "$nms_distribution" = no ; then
|
||||
AC_DEFINE([HAVE_DECL_BASENAME], [1], [Needed for demangle.h])
|
||||
# libiberty prevents distribution because of licensing
|
||||
AC_CHECK_HEADERS([demangle.h libiberty/demangle.h],[break])
|
||||
# libbfd prevents distribution because of licensing
|
||||
AC_CHECK_HEADERS([bfd.h])
|
||||
AC_SEARCH_LIBS([bfd_openr],[bfd],[LIBS="$LIBS -lz -liberty -ldl"],,[-lz -liberty -ldl])
|
||||
fi
|
||||
if test "$ac_cv_func_backtrace" = yes ; then
|
||||
nms_backtrace=yes
|
||||
ldbacktrace=-rdynamic
|
||||
AC_DEFINE([NMS_BACKTRACE], [1], [Enable backtrace])
|
||||
elif test "$enable_backtrace" = yes ; then
|
||||
AC_MSG_ERROR([Backtrace unavailable])
|
||||
fi
|
||||
AC_SUBST([ldbacktrace])
|
||||
fi
|
||||
AC_MSG_CHECKING([backtrace])
|
||||
AC_MSG_RESULT([${nms_backtrace:-no}])])
|
||||
|
||||
AC_DEFUN([NMS_CONFIG_FILES],
|
||||
[CONFIG_FILES="Makefile $1"
|
||||
SUBDIRS="$2"
|
||||
for generated in config.h.in configure ; do
|
||||
if test $srcdir/configure.ac -nt $srcdir/$generated ; then
|
||||
touch $srcdir/$generated
|
||||
fi
|
||||
done
|
||||
for dir in . $SUBDIRS
|
||||
do
|
||||
CONFIG_FILES="$CONFIG_FILES $dir/Makesub"
|
||||
test -f ${srcdir}/$dir/tests/Makesub.in && CONFIG_FILES="$CONFIG_FILES $dir/tests/Makesub"
|
||||
done
|
||||
AC_CONFIG_FILES([$CONFIG_FILES])
|
||||
AC_SUBST(configure_args,[$ac_configure_args])
|
||||
AC_SUBST(SUBDIRS)
|
||||
AC_SUBST(CONFIG_FILES)])
|
||||
|
209
libcody/configure
vendored
209
libcody/configure
vendored
@ -587,15 +587,11 @@ PACKAGE_URL=''
|
||||
ac_unique_file="cody.hh"
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
ALOY
|
||||
DOXYGEN
|
||||
configure_args
|
||||
AR
|
||||
RANLIB
|
||||
EXCEPTIONS
|
||||
PICFLAG
|
||||
CONFIG_FILES
|
||||
SUBDIRS
|
||||
configure_args
|
||||
OBJEXT
|
||||
EXEEXT
|
||||
ac_ct_CXX
|
||||
@ -604,8 +600,6 @@ LDFLAGS
|
||||
CXXFLAGS
|
||||
CXX
|
||||
MAINTAINER
|
||||
NUM_CPUS
|
||||
tools
|
||||
host_os
|
||||
host_vendor
|
||||
host_cpu
|
||||
@ -655,10 +649,8 @@ SHELL'
|
||||
ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
with_tools
|
||||
enable_maintainer_mode
|
||||
with_compiler
|
||||
with_bugurl
|
||||
enable_checking
|
||||
enable_host_shared
|
||||
enable_exceptions
|
||||
@ -1299,9 +1291,7 @@ Optional Features:
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-tools=DIR tool directory
|
||||
--with-compiler=NAME which compiler to use
|
||||
--with-bugurl=URL where to report bugs
|
||||
|
||||
Some influential environment variables:
|
||||
CXX C++ compiler command
|
||||
@ -1836,27 +1826,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
# thanks to Zack Weinberg for fixing this!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1869,7 +1838,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
ac_aux_dir=
|
||||
for ac_dir in build-aux "$srcdir"/build-aux; do
|
||||
for ac_dir in .. "$srcdir"/..; do
|
||||
if test -f "$ac_dir/install-sh"; then
|
||||
ac_aux_dir=$ac_dir
|
||||
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||
@ -1885,7 +1854,7 @@ for ac_dir in build-aux "$srcdir"/build-aux; do
|
||||
fi
|
||||
done
|
||||
if test -z "$ac_aux_dir"; then
|
||||
as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
|
||||
as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# These three variables are undocumented and unsupported,
|
||||
@ -1899,9 +1868,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
if test -e configure ; then
|
||||
as_fn_error $? "Do not build in the source tree. Reasons" "$LINENO" 5
|
||||
fi
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||
@ -1974,43 +1940,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-tools was given.
|
||||
if test "${with_tools+set}" = set; then :
|
||||
withval=$with_tools; case $withval in #(
|
||||
yes) :
|
||||
as_fn_error $? "--with-tools requires an argument" "$LINENO" 5 ;; #(
|
||||
no) :
|
||||
: ;; #(
|
||||
*) :
|
||||
tools="${withval%/bin}" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
if test -n "$tools" ; then
|
||||
if test -d "$tools/bin"; then
|
||||
PATH="$tools/bin:$PATH"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using tools in $tools" >&5
|
||||
$as_echo "$as_me: Using tools in $tools" >&6;}
|
||||
else
|
||||
as_fn_error $? "tool location does not exist" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of CPUs" >&5
|
||||
$as_echo_n "checking number of CPUs... " >&6; }
|
||||
case $build in #(
|
||||
*-*-darwin*) :
|
||||
NUM_CPUS=$(sysctl -n hw.ncpu 2>/dev/null) ;; #(
|
||||
*) :
|
||||
NUM_CPUS=$(grep -c '^processor' /proc/cpuinfo 2>/dev/null) ;;
|
||||
esac
|
||||
test "$NUM_CPUS" = 0 && NUM_CPUS=
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NUM_CPUS:-unknown}" >&5
|
||||
$as_echo "${NUM_CPUS:-unknown}" >&6; }
|
||||
test "$NUM_CPUS" = 1 && NUM_CPUS=
|
||||
|
||||
# Check whether --enable-maintainer-mode was given.
|
||||
if test "${enable_maintainer_mode+set}" = set; then :
|
||||
enableval=$enable_maintainer_mode;
|
||||
@ -2634,17 +2563,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
unset CXX_ORIG
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
if test "$tools" && test -d "$tools/include" ; then
|
||||
CXX="$CXX -I$tools/include"
|
||||
fi
|
||||
if test "$tools" && test -d "$tools/lib" ; then
|
||||
toollib="$tools/lib"
|
||||
if os=$(CXX -print-multi-os-directory 2>/dev/null) ; then
|
||||
toollib="$toollib/${os}"
|
||||
fi
|
||||
LDFLAGS="$LDFLAGS -L $toollib"
|
||||
unset toollib
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking adding -Wl,--no-undefined to linker" >&5
|
||||
$as_echo_n "checking adding -Wl,--no-undefined to linker... " >&6; }
|
||||
ORIG_LDFLAGS="$LDFLAGS"
|
||||
@ -2671,24 +2589,6 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
unset ORIG_LDFLAGS
|
||||
CONFIG_FILES="Makefile gdbinit dox.cfg"
|
||||
SUBDIRS=""
|
||||
for generated in config.h.in configure ; do
|
||||
if test $srcdir/configure.ac -nt $srcdir/$generated ; then
|
||||
touch $srcdir/$generated
|
||||
fi
|
||||
done
|
||||
for dir in . $SUBDIRS
|
||||
do
|
||||
CONFIG_FILES="$CONFIG_FILES $dir/Makesub"
|
||||
test -f ${srcdir}/$dir/tests/Makesub.in && CONFIG_FILES="$CONFIG_FILES $dir/tests/Makesub"
|
||||
done
|
||||
ac_config_files="$ac_config_files $CONFIG_FILES"
|
||||
|
||||
configure_args=$ac_configure_args
|
||||
|
||||
|
||||
|
||||
|
||||
# Enable expensive internal checks
|
||||
is_release=
|
||||
@ -2698,30 +2598,6 @@ if test -d $srcdir/../gcc \
|
||||
is_release=yes
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking bugurl" >&5
|
||||
$as_echo_n "checking bugurl... " >&6; }
|
||||
|
||||
# Check whether --with-bugurl was given.
|
||||
if test "${with_bugurl+set}" = set; then :
|
||||
withval=$with_bugurl; case "$withval" in #(
|
||||
yes) :
|
||||
as_fn_error $? "--with-bugurl requires an argument" "$LINENO" 5 ;; #(
|
||||
no) :
|
||||
BUGURL="" ;; #(
|
||||
*) :
|
||||
BUGURL="${withval}" ;;
|
||||
esac
|
||||
else
|
||||
BUGURL="${PACKAGE_BUGREPORT}"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUGURL" >&5
|
||||
$as_echo "$BUGURL" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define BUGURL "$BUGURL"
|
||||
_ACEOF
|
||||
|
||||
# Check whether --enable-checking was given.
|
||||
if test "${enable_checking+set}" = set; then :
|
||||
enableval=$enable_checking; ac_checking_flags="${enableval}"
|
||||
@ -2790,8 +2666,6 @@ if test "$nms_exceptions" != no ; then
|
||||
fi
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
@ -2976,83 +2850,14 @@ else
|
||||
AR="$ac_cv_prog_AR"
|
||||
fi
|
||||
|
||||
# Extract the first word of "doxygen", so it can be a program name with args.
|
||||
set dummy doxygen; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_DOXYGEN+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$DOXYGEN"; then
|
||||
ac_cv_prog_DOXYGEN="$DOXYGEN" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_DOXYGEN="doxygen"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_prog_DOXYGEN" && ac_cv_prog_DOXYGEN=": NOTdoxygen"
|
||||
fi
|
||||
fi
|
||||
DOXYGEN=$ac_cv_prog_DOXYGEN
|
||||
if test -n "$DOXYGEN"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
|
||||
$as_echo "$DOXYGEN" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
# Extract the first word of "aloy", so it can be a program name with args.
|
||||
set dummy aloy; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ALOY+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ALOY"; then
|
||||
ac_cv_prog_ALOY="$ALOY" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ALOY="aloy"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_prog_ALOY" && ac_cv_prog_ALOY=": Joust testsuite missing"
|
||||
fi
|
||||
fi
|
||||
ALOY=$ac_cv_prog_ALOY
|
||||
if test -n "$ALOY"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALOY" >&5
|
||||
$as_echo "$ALOY" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
||||
configure_args=$ac_configure_args
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
@ -3744,8 +3549,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
for ac_config_target in $ac_config_targets
|
||||
do
|
||||
case $ac_config_target in
|
||||
"$CONFIG_FILES") CONFIG_FILES="$CONFIG_FILES $CONFIG_FILES" ;;
|
||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
@ -6,22 +6,17 @@ AC_INIT([codylib],[0.0],[github.com/urnathan/libcody])
|
||||
AC_CONFIG_SRCDIR(cody.hh)
|
||||
m4_include(config.m4)
|
||||
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
AC_SUBST(PACKAGE_VERSION)
|
||||
|
||||
NMS_NOT_IN_SOURCE
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
NMS_TOOLS
|
||||
NMS_NUM_CPUS
|
||||
NMS_MAINTAINER_MODE
|
||||
NMS_CXX_COMPILER
|
||||
AC_LANG(C++)
|
||||
AC_PROG_CXX
|
||||
NMS_CXX_11
|
||||
NMS_TOOL_DIRS
|
||||
NMS_LINK_OPT([-Wl,--no-undefined])
|
||||
NMS_CONFIG_FILES([gdbinit dox.cfg])
|
||||
|
||||
# Enable expensive internal checks
|
||||
is_release=
|
||||
@ -31,7 +26,6 @@ if test -d $srcdir/../gcc \
|
||||
is_release=yes
|
||||
fi
|
||||
|
||||
NMS_BUGURL
|
||||
dnl NMS_ENABLE_CHECKING
|
||||
dnl cloned from ../libcpp/configure.ac
|
||||
AC_ARG_ENABLE(checking,
|
||||
@ -75,12 +69,13 @@ AC_SUBST(PICFLAG)
|
||||
|
||||
NMS_ENABLE_EXCEPTIONS
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_PROG_RANLIB
|
||||
AC_CHECK_TOOL([AR],[ar])
|
||||
AC_CHECK_PROG([DOXYGEN],[doxygen],[doxygen],[: NOTdoxygen])
|
||||
AC_CHECK_PROG([ALOY],[aloy],[aloy],[: Joust testsuite missing])
|
||||
AH_VERBATIM([_GNU_SOURCE],[#define _GNU_SOURCE 1])
|
||||
AH_VERBATIM([_FORTIFY_SOURCE],[#undef _FORTIFY_SOURCE])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_SUBST(configure_args,[$ac_configure_args])
|
||||
|
||||
AC_OUTPUT
|
||||
|
2478
libcody/dox.cfg.in
2478
libcody/dox.cfg.in
File diff suppressed because it is too large
Load Diff
@ -30,8 +30,6 @@ void (HCF) (char const *msg
|
||||
#endif
|
||||
) noexcept
|
||||
{ // HCF - you goofed!
|
||||
// A useful place for a breakpoint to land.
|
||||
//__asm__ volatile ("nop"); // HCF - you goofed!
|
||||
|
||||
#if !NMS_CHECKING
|
||||
constexpr Location loc (nullptr, 0);
|
||||
@ -56,24 +54,4 @@ void (HCF) (char const *msg
|
||||
exit (2);
|
||||
}
|
||||
|
||||
void BuildNote (FILE *stream) noexcept
|
||||
{
|
||||
fprintf (stream, "Version %s.\n", PACKAGE_NAME " " PACKAGE_VERSION);
|
||||
fprintf (stream, "Report bugs to %s.\n", BUGURL[0] ? BUGURL : "you");
|
||||
if (PACKAGE_URL[0])
|
||||
fprintf (stream, "See %s for more information.\n", PACKAGE_URL);
|
||||
if (REVISION[0])
|
||||
fprintf (stream, "Source %s.\n", REVISION);
|
||||
|
||||
fprintf (stream, "Build is %s & %s.\n",
|
||||
#if !NMS_CHECKING
|
||||
"un"
|
||||
#endif
|
||||
"checked",
|
||||
#if !__OPTIMIZE__
|
||||
"un"
|
||||
#endif
|
||||
"optimized");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
# CODYlib -*- mode:autoconf -*-
|
||||
# Copyright (C) 2020 Nathan Sidwell, nathan@acm.org
|
||||
# License: Apache v2.0
|
||||
|
||||
dir @srcdir@
|
||||
# some default breakpoints, to catch the fatal exit
|
||||
set breakpoint pending on
|
||||
break HCF
|
||||
set complaints 0
|
||||
break exit
|
||||
set breakpoint pending off
|
@ -130,7 +130,4 @@ inline void Unreachable () noexcept
|
||||
}
|
||||
#endif
|
||||
|
||||
// FIXME: This should be user visible in some way
|
||||
void BuildNote (FILE *stream) noexcept;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user