diff --git a/Makefile b/Makefile
deleted file mode 100644
index d3429e3be..000000000
--- a/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-include header.mk
-
-ifeq (yes, $(BUILD_DARWIN))
-osx-bundle:
- $(BIN_SHELL) tools/osx-bundle.sh "$(AEGISUB_COMMAND)" "$(BIN_WX_CONFIG)" "$(FONTCONFIG_CONF_DIR)" DICT_DIR=$(DICT_DIR)
-
-osx-dmg: osx-bundle
- codesign -s 'Mac Developer' --deep Aegisub.app || true
- $(BIN_SHELL) tools/osx-dmg.sh "$(BUILD_VERSION_STRING)"
-endif
-
-include Makefile.target
diff --git a/Makefile.inc.in b/Makefile.inc.in
deleted file mode 100644
index 5f1a4054f..000000000
--- a/Makefile.inc.in
+++ /dev/null
@@ -1,139 +0,0 @@
-#########################
-# AEGISUB FEATURE SUPPORT
-#########################
-HAVE_ALSA = @with_alsa@
-HAVE_FFMS2 = @with_ffms2@
-HAVE_HUNSPELL = @with_hunspell@
-HAVE_LIBPULSE = @with_libpulse@
-HAVE_OPENAL = @with_openal@
-HAVE_OSS = @with_oss@
-HAVE_PORTAUDIO = @with_portaudio@
-HAVE_UCHARDET = @with_uchardet@
-
-##############
-# BUILD OUTPUT
-##############
-PROGRAM := $(PROGRAM)
-LIB := $(LIB)
-
-###################
-# PLATFORM SETTINGS
-###################
-BUILD_DARWIN = @build_darwin@
-
-#######
-# FLAGS
-#######
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CFLAGS_DEP = -MMD -MP
-LIBS = @LIBS@
-LDFLAGS = @LDFLAGS@
-INSTALL_FLAGS = -m 644
-LIB_SHARED_LINK = -shared -Wl,-soname -Wl,$(LIB_SHARED_FULL)
-LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibility_version $(LIB_VERSION) -current_version $(LIB_VERSION) -Wl,-single_module -mmacosx-version-min=10.8 -install_name ${CURDIR}/$(LIB_SHARED_FULL)
-
-#########
-# STRINGS
-#########
-AEGISUB_COMMAND = @AEGISUB_COMMAND@
-AEGISUB_CATALOG = @AEGISUB_CATALOG@
-BUILD_DATE = @BUILD_DATE@
-BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@
-
-#######
-# PATHS
-#######
-prefix = ${P_PREFIX}
-exec_prefix = ${P_PREFIX_EXEC}
-datarootdir = ${P_DATAROOT}
-P_PREFIX = @prefix@
-P_PREFIX_EXEC = @exec_prefix@
-P_BINDIR = @bindir@
-P_DATAROOT = @datarootdir@
-P_LOCALE = @localedir@
-
-P_DESKTOP = @P_DESKTOP@
-P_ICON = @P_ICON@
-P_DATA = $(P_DATAROOT)/aegisub/
-
-###############
-# LIBRARY FLAGS
-###############
-CFLAGS_WX = @WX_CFLAGS@
-CXXFLAGS_WX = @WX_CXXFLAGS@
-CPPFLAGS_WX = @WX_CPPFLAGS@
-LIBS_WX = @WX_LIBS@ -lz
-
-CPPFLAGS_BOOST = @BOOST_CPPFLAGS@
-LIBS_BOOST = @BOOST_LDFLAGS@ @BOOST_FILESYSTEM_LIB@ @BOOST_LOCALE_LIB@ @BOOST_REGEX_LIB@ @BOOST_SYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_CHRONO_LIB@
-
-CFLAGS_FFMS2 = @FFMS2_CFLAGS@
-CFLAGS_FFTW3 = @FFTW3_CFLAGS@
-CFLAGS_FONTCONFIG = @FONTCONFIG_CFLAGS@
-CFLAGS_FREETYPE = @FREETYPE_CFLAGS@
-CFLAGS_GL = @GL_CFLAGS@
-CFLAGS_HUNSPELL = @HUNSPELL_CFLAGS@
-CFLAGS_ICONV = @ICONV_CFLAGS@
-CFLAGS_ICU = @ICU_I18N_CFLAGS@
-CFLAGS_LIBASS = @LIBASS_CFLAGS@
-CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
-CFLAGS_LUA = @LUAJIT_CFLAGS@
-CFLAGS_OPENAL = @OPENAL_CFLAGS@
-CFLAGS_OSS = @OSS_CFLAGS@
-CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
-CFLAGS_PTHREAD = @PTHREAD_CFLAGS@
-CFLAGS_UCHARDET = @UCHARDET_CFLAGS@
-
-LIBS_ALSA = @ALSA_LIBS@
-LIBS_FFMS2 = @FFMS2_LIBS@
-LIBS_FFTW3 = @FFTW3_LIBS@
-LIBS_FONTCONFIG = @FONTCONFIG_LIBS@
-LIBS_FREETYPE = @FREETYPE_LIBS@
-LIBS_GL = @GL_LIBS@
-LIBS_HUNSPELL = @HUNSPELL_LIBS@
-LIBS_ICONV = @ICONV_LIBS@
-LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
-LIBS_LIBASS = @LIBASS_LIBS@
-LIBS_LIBPULSE = @LIBPULSE_LIBS@
-LIBS_LUA = @LUAJIT_LIBS@
-LIBS_OPENAL = @OPENAL_LIBS@
-LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
-LIBS_PTHREAD = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
-LIBS_UCHARDET = @UCHARDET_LIBS@
-
-ifeq (yes, $(BUILD_DARWIN))
-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
-endif
-
-FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@
-
-#####################
-# DEBUG / DEVELOPMENT
-#####################
-PRECOMPILED_HEADER = @enable_gcc_prec@
-
-##########
-# BINARIES
-##########
-BIN_AR = ar
-BIN_RANLIB = ranlib
-BIN_LN = ln
-BIN_RM = rm
-BIN_SHELL = @SHELL@
-BIN_MV = mv
-BIN_SED = sed
-BIN_INSTALL = @INSTALL@
-BIN_MSGMERGE = @MSGMERGE@
-BIN_XGETTEXT = @XGETTEXT@
-BIN_MSGFMT = @MSGFMT@
-BIN_CC = @CC@
-BIN_CXX = @CXX@
-BIN_CP = cp
-BIN_MKDIR = mkdir
-BIN_MKDIR_P = mkdir -p
-BIN_ECHO = echo
-BIN_TOUCH = touch
-BIN_LUA = @LUA@
-BIN_WX_CONFIG = @WX_CONFIG_PATH@
diff --git a/Makefile.target b/Makefile.target
deleted file mode 100644
index 516ef3c24..000000000
--- a/Makefile.target
+++ /dev/null
@@ -1,121 +0,0 @@
-ifneq (yes, $(INCLUDING_CHILD_MAKEFILES))
-COMMANDS := all install clean distclean test depclean osx-bundle osx-dmg test-automation test-libaegisub
-.PHONY: $(COMMANDS)
-.DEFAULT_GOAL := all
-
-# Would be nice to move this somewhere else (Makefile.inc?)
-ifeq (yes, $(BUILD_DARWIN))
-CFLAGS += -mmacosx-version-min=10.8 -gfull
-CXXFLAGS += -mmacosx-version-min=10.8 -gfull
-LDFLAGS += -mmacosx-version-min=10.8 -Wl,-dead_strip -pagezero_size 10000 -image_base 100000000
-LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX)
-endif
-
-LIB_TARGETS := $(addprefix $(TOP)lib/,$(LIB:%=lib%.a))
-
-# Handle per-target flags in the form foo_CFLAGS := -w by mapping them to all
-# of the objects a target depends on. This has potentially dumb results if
-# multiple targets use a single object file, so don't do that.
-define set_target_flags
- OBJ += $($1_OBJ)
-
- $($1_OBJ): CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
- $($1_OBJ): CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
- $($1_OBJ): OBJCXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
-
- ifeq (yes, $(PRECOMPILED_HEADER))
- ifdef $1_PCH
- CLEANFILES += $($1_PCH).gch
- $($1_OBJ): CXXFLAGS += -include $($1_PCH) $(PCHFLAGS)
- $($1_OBJ): $($1_PCH).gch
- $($1_PCH).gch: $($1_PCH)
- $($1_PCH).gch: CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
- $($1_PCH).gch: CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
- else
- $($1_OBJ): CXXFLAGS += -include acconf.h
- endif
- else
- $($1_OBJ): CXXFLAGS += -include acconf.h
- endif
-endef
-$(foreach target,$(LIB),$(eval $(call set_target_flags,$(target),$(TOP)lib/lib$(target).a)))
-$(foreach target,$(PROGRAM),$(eval $(call set_target_flags,$(notdir $(target)),$(target))))
-
-# Create the build and install targets for programs
-# Not done with a pattern rule since the pattern would be just %: and doing that
-# leads to make trying to use gcc to make any nonexistent targets rather than
-# erroring
-define create_program_targets
- ifdef $1_INSTALLNAME
-install: $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
-$(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME): $(dir $2)$($1_INSTALLNAME)
- @$(BIN_MKDIR) -p $(DESTDIR)$(P_BINDIR)
- @$(BIN_INSTALL) $(dir $2)$($1_INSTALLNAME) $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
-$(dir $2)$($1_INSTALLNAME): $($1_OBJ)
- $(BIN_CXX) -o $(dir $2)$($1_INSTALLNAME) $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
-all: $(dir $2)$($1_INSTALLNAME)
- else
-$2: $($1_OBJ)
- $(BIN_CXX) -o $2 $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
-all: $2
- endif
- $(eval CLEANFILES += $(filter-out %/,$2 $(dir $2)$($1_INSTALLNAME)))
-endef
-$(foreach target,$(PROGRAM),$(eval $(call create_program_targets,$(notdir $(target)),$(target))))
-
-# The dependency files which will be automatically generated by gcc.
-# The filter is due to that libraries also appear in OBJ
-DEP := $(filter %.d,$(OBJ:%.o=%.d))
-
-# If the goal is a relative path to a file, convert it to an absolute path
-ifneq ($(filter-out $(COMMANDS),$(MAKECMDGOALS)),)
-ABSGOAL := $(abspath $(MAKECMDGOALS))
-ifneq ($(MAKECMDGOALS),$(ABSGOAL))
-$(MAKECMDGOALS): $(ABSGOAL) ;
-endif
-endif
-
-# Primary build targets
-all: $(LIB_TARGETS)
-
-clean:
- $(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB_TARGETS)
-
-distclean: clean
- $(BIN_RM) -rf $(DISTCLEANFILES) $(DEP)
-
-depclean: clean
- $(BIN_RM) -rf $(DEP)
-
-install:
-
-# The actual build rules
-.SUFFIXES:
-
-CXX_CMD = $(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS)
-CC_CMD = $(CXX_ENV) $(BIN_CC) $(CFLAGS_DEP) $(CPPFLAGS)
-POST_FLAGS = $($@_FLAGS) -c -o $@ $<
-
-%.o: %.c ; $(CC_CMD) $(CFLAGS) $(POST_FLAGS)
-%.o: %.cpp ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
-%.o: %.cxx ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
-%.o: %.cc ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
-%.o: %.mm ; $(CXX_CMD) $(OBJCXXFLAGS) $(POST_FLAGS)
-%.o: %.m ; $(CC_CMD) $(CFLAGS) -fmodules $(POST_FLAGS)
-
-%.gch: %
- @$(BIN_RM) -f $@
- $(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $<
-
-.SECONDEXPANSION:
-
-# Libraries contain all object files they depend on (but they may depend on other files)
-# Not using libtool on OS X because it has an unsilenceable warning about a
-# compatibility issue with BSD 4.3 (wtf)
-lib%.a: $$($$*_OBJ)
- @$(BIN_MKDIR_P) $(dir $@)
- $(BIN_AR) cru $@ $(filter %.o,$^)
- $(BIN_RANLIB) $@
-
--include $(DEP)
-endif
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index aee5b047d..000000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-m4_include([m4macros/ac_agi.m4])
-m4_include([m4macros/ac_flag.m4])
-m4_include([m4macros/agi_find_libheader.m4])
-m4_include([m4macros/ax_boost_base.m4])
-m4_include([m4macros/ax_boost_chrono.m4])
-m4_include([m4macros/ax_boost_filesystem.m4])
-m4_include([m4macros/ax_boost_locale.m4])
-m4_include([m4macros/ax_boost_regex.m4])
-m4_include([m4macros/ax_boost_system.m4])
-m4_include([m4macros/ax_boost_thread.m4])
-m4_include([m4macros/ax_check_gl.m4])
-m4_include([m4macros/ax_lang_compiler_ms.m4])
-m4_include([m4macros/ax_pthread.m4])
-m4_include([m4macros/check_gnu_make.m4])
-m4_include([m4macros/wxwin.m4])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 46b4be7e7..000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo Running autoreconf...
-autoreconf -ivf "$@"
-
-echo Now run ./configure and then make to build Aegisub
diff --git a/automation/Makefile b/automation/Makefile
deleted file mode 100644
index 76c7dd992..000000000
--- a/automation/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
-
-DATA_AUTOMATION := \
- $(sort $(wildcard $(d)autoload/*)) \
- $(sort $(wildcard $(d)demos/*)) \
- $(sort $(wildcard $(d)include/*.lua)) \
- $(sort $(wildcard $(d)include/aegisub/*))
-
-DATA_AUTOMATION_REL := $(subst $(d),,$(DATA_AUTOMATION))
-DATA_AUTOMATION_INSTALLED = $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(DATA_AUTOMATION_REL))
-
-$(DESTDIR)$(P_DATA)/automation/%: $(d)%
- $(MKDIR_INSTALL)
-
-aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a $(LIBS_LUA)
-aegisub-lua_CPPFLAGS := $(CPPFLAGS_BOOST) $(CFLAGS_LUA) -I$(TOP)libaegisub/include -I$(TOP)src $(CXXFLAGS_WX)
-aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_PTHREAD)
-
-PROGRAM += $(d)aegisub-lua
-
-test-automation: $(PROGRAM)
- eval `luarocks path`; cd $(TOP)automation; ./aegisub-lua tests/busted.lua -p 'moon' tests/modules
-
-test: test-automation
-
-install: $(DATA_AUTOMATION_INSTALLED)
-
-include $(TOP)Makefile.target
diff --git a/config.guess b/config.guess
deleted file mode 100755
index 883a6713b..000000000
--- a/config.guess
+++ /dev/null
@@ -1,1476 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2018 Free Software Foundation, Inc.
-
-timestamp='2018-05-19'
-
-# This file 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 .
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
-#
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
-#
-# Please send patches to .
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Options:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to ."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2018 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
- ,,) echo "int x;" > "$dummy.c" ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-case "$UNAME_SYSTEM" in
-Linux|GNU|GNU/*)
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- LIBC=gnu
-
- eval "$set_cc_for_build"
- cat <<-EOF > "$dummy.c"
- #include
- #if defined(__UCLIBC__)
- LIBC=uclibc
- #elif defined(__dietlibc__)
- LIBC=dietlibc
- #else
- LIBC=gnu
- #endif
- EOF
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
-
- # If ldd exists, use it to detect musl libc.
- if command -v ldd >/dev/null && \
- ldd --version 2>&1 | grep -q ^musl
- then
- LIBC=musl
- fi
- ;;
-esac
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- "/sbin/$sysctl" 2>/dev/null || \
- "/usr/sbin/$sysctl" 2>/dev/null || \
- echo unknown)`
- case "$UNAME_MACHINE_ARCH" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- earmv*)
- arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine="${arch}${endian}"-unknown
- ;;
- *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently (or will in the future) and ABI.
- case "$UNAME_MACHINE_ARCH" in
- earm*)
- os=netbsdelf
- ;;
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval "$set_cc_for_build"
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # Determine ABI tags.
- case "$UNAME_MACHINE_ARCH" in
- earm*)
- expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "$UNAME_VERSION" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "$machine-${os}${release}${abi-}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
- exit ;;
- *:LibertyBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
- exit ;;
- *:MidnightBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
- exit ;;
- *:ekkoBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
- exit ;;
- *:SolidBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
- exit ;;
- *:MirBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
- exit ;;
- *:Sortix:*:*)
- echo "$UNAME_MACHINE"-unknown-sortix
- exit ;;
- *:Redox:*:*)
- echo "$UNAME_MACHINE"-unknown-redox
- exit ;;
- mips:OSF1:*.*)
- echo mips-dec-osf1
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE=alpha ;;
- "EV4.5 (21064)")
- UNAME_MACHINE=alpha ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE=alpha ;;
- "EV5 (21164)")
- UNAME_MACHINE=alphaev5 ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE=alphaev56 ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE=alphapca56 ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE=alphapca57 ;;
- "EV6 (21264)")
- UNAME_MACHINE=alphaev6 ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE=alphaev67 ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE=alphaev69 ;;
- "EV7 (21364)")
- UNAME_MACHINE=alphaev7 ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE=alphaev79 ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo "$UNAME_MACHINE"-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo "$UNAME_MACHINE"-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix"$UNAME_RELEASE"
- exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux"$UNAME_RELEASE"
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval "$set_cc_for_build"
- SUN_ARCH=i386
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=x86_64
- fi
- fi
- echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos"$UNAME_RELEASE"
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos"$UNAME_RELEASE"
- ;;
- sun4)
- echo sparc-sun-sunos"$UNAME_RELEASE"
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos"$UNAME_RELEASE"
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint"$UNAME_RELEASE"
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint"$UNAME_RELEASE"
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint"$UNAME_RELEASE"
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten"$UNAME_RELEASE"
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten"$UNAME_RELEASE"
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix"$UNAME_RELEASE"
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix"$UNAME_RELEASE"
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix"$UNAME_RELEASE"
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
-#ifdef __cplusplus
-#include /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
- dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos"$UNAME_RELEASE"
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
- then
- if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
- [ "$TARGET_BINARY_INTERFACE"x = x ]
- then
- echo m88k-dg-dgux"$UNAME_RELEASE"
- else
- echo m88k-dg-dguxbcs"$UNAME_RELEASE"
- fi
- else
- echo i586-dg-dgux"$UNAME_RELEASE"
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
- fi
- echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
- #include
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/lslpp ] ; then
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
- else
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
- fi
- echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
- case "$UNAME_MACHINE" in
- 9000/31?) HP_ARCH=m68000 ;;
- 9000/[34]??) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "$sc_cpu_version" in
- 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
- 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "$sc_kernel_bits" in
- 32) HP_ARCH=hppa2.0n ;;
- 64) HP_ARCH=hppa2.0w ;;
- '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "$HP_ARCH" = "" ]; then
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
-
- #define _HPUX_SOURCE
- #include
- #include
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ "$HP_ARCH" = hppa2.0w ]
- then
- eval "$set_cc_for_build"
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH=hppa2.0w
- else
- HP_ARCH=hppa64
- fi
- fi
- echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux"$HPUX_REV"
- exit ;;
- 3050*:HI-UX:*:*)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
- #include
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo "$UNAME_MACHINE"-unknown-osf1mk
- else
- echo "$UNAME_MACHINE"-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi"$UNAME_RELEASE"
- exit ;;
- *:BSD/OS:*:*)
- echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case "$UNAME_PROCESSOR" in
- amd64)
- UNAME_PROCESSOR=x86_64 ;;
- i386)
- UNAME_PROCESSOR=i586 ;;
- esac
- echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
- exit ;;
- i*:CYGWIN*:*)
- echo "$UNAME_MACHINE"-pc-cygwin
- exit ;;
- *:MINGW64*:*)
- echo "$UNAME_MACHINE"-pc-mingw64
- exit ;;
- *:MINGW*:*)
- echo "$UNAME_MACHINE"-pc-mingw32
- exit ;;
- *:MSYS*:*)
- echo "$UNAME_MACHINE"-pc-msys
- exit ;;
- i*:PW*:*)
- echo "$UNAME_MACHINE"-pc-pw32
- exit ;;
- *:Interix*:*)
- case "$UNAME_MACHINE" in
- x86)
- echo i586-pc-interix"$UNAME_RELEASE"
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix"$UNAME_RELEASE"
- exit ;;
- IA64)
- echo ia64-unknown-interix"$UNAME_RELEASE"
- exit ;;
- esac ;;
- i*:UWIN*:*)
- echo "$UNAME_MACHINE"-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
- exit ;;
- i*86:Minix:*:*)
- echo "$UNAME_MACHINE"-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- arc:Linux:*:* | arceb:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- arm*:Linux:*:*)
- eval "$set_cc_for_build"
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
- else
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- cris:Linux:*:*)
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
- exit ;;
- crisv32:Linux:*:*)
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
- exit ;;
- e2k:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- frv:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- hexagon:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- i*86:Linux:*:*)
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
- exit ;;
- ia64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- k1om:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- m32r*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- m68*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
- test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
- ;;
- mips64el:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- openrisc*:Linux:*:*)
- echo or1k-unknown-linux-"$LIBC"
- exit ;;
- or32:Linux:*:* | or1k*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-"$LIBC"
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-"$LIBC"
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
- PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
- *) echo hppa-unknown-linux-"$LIBC" ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-"$LIBC"
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-"$LIBC"
- exit ;;
- ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-"$LIBC"
- exit ;;
- ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-"$LIBC"
- exit ;;
- riscv32:Linux:*:* | riscv64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
- exit ;;
- sh64*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- sh*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- tile*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- vax:Linux:*:*)
- echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
- exit ;;
- x86_64:Linux:*:*)
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
- exit ;;
- xtensa*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo "$UNAME_MACHINE"-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo "$UNAME_MACHINE"-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo "$UNAME_MACHINE"-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo "$UNAME_MACHINE"-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos"$UNAME_RELEASE"
- exit ;;
- i*86:*DOS:*:*)
- echo "$UNAME_MACHINE"-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:*)
- UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
- else
- echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
- else
- echo "$UNAME_MACHINE"-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configure will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos"$UNAME_RELEASE"
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos"$UNAME_RELEASE"
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos"$UNAME_RELEASE"
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos"$UNAME_RELEASE"
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv"$UNAME_RELEASE"
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo "$UNAME_MACHINE"-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes .
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo "$UNAME_MACHINE"-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux"$UNAME_RELEASE"
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv"$UNAME_RELEASE"
- else
- echo mips-unknown-sysv"$UNAME_RELEASE"
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux"$UNAME_RELEASE"
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody"$UNAME_RELEASE"
- exit ;;
- *:Rhapsody:*:*)
- echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval "$set_cc_for_build"
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
- fi
- if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
- fi
- fi
- elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
- fi
- echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = x86; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-*:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSR-*:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSV-*:NONSTOP_KERNEL:*:*)
- echo nsv-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSX-*:NONSTOP_KERNEL:*:*)
- echo nsx-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = 386; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo "$UNAME_MACHINE"-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux"$UNAME_RELEASE"
- exit ;;
- *:DragonFly:*:*)
- echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "$UNAME_MACHINE" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
- exit ;;
- i*86:rdos:*:*)
- echo "$UNAME_MACHINE"-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo "$UNAME_MACHINE"-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo "$UNAME_MACHINE"-unknown-esx
- exit ;;
- amd64:Isilon\ OneFS:*:*)
- echo x86_64-unknown-onefs
- exit ;;
-esac
-
-echo "$0: unable to guess system type" >&2
-
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
- mips:Linux | mips64:Linux)
- # If we got here on MIPS GNU/Linux, output extra information.
- cat >&2 <&2 </dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = "$UNAME_MACHINE"
-UNAME_RELEASE = "$UNAME_RELEASE"
-UNAME_SYSTEM = "$UNAME_SYSTEM"
-UNAME_VERSION = "$UNAME_VERSION"
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config.sub b/config.sub
deleted file mode 100755
index d1f5b5490..000000000
--- a/config.sub
+++ /dev/null
@@ -1,1808 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2018 Free Software Foundation, Inc.
-
-timestamp='2018-05-24'
-
-# This file 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 .
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches to .
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
-
-Canonicalize a configuration name.
-
-Options:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to ."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2018 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo "$1"
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Split fields of configuration type
-IFS="-" read -r field1 field2 field3 field4 <&2
- exit 1
- ;;
- *-*-*-*)
- basic_machine=$field1-$field2
- os=$field3-$field4
- ;;
- *-*-*)
- # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
- # parts
- maybe_os=$field2-$field3
- case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
- | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
- | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
- | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
- | storm-chaos* | os2-emx* | rtmk-nova*)
- basic_machine=$field1
- os=$maybe_os
- ;;
- android-linux)
- basic_machine=$field1-unknown
- os=linux-android
- ;;
- *)
- basic_machine=$field1-$field2
- os=$field3
- ;;
- esac
- ;;
- *-*)
- # Second component is usually, but not always the OS
- case $field2 in
- # Prevent following clause from handling this valid os
- sun*os*)
- basic_machine=$field1
- os=$field2
- ;;
- # Manufacturers
- dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
- | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
- | unicom* | ibm* | next | hp | isi* | apollo | altos* \
- | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
- | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
- | harris | dolphin | highlevel | gould | cbm | ns | masscomp \
- | apple | axis | knuth | cray | microblaze* \
- | sim | cisco | oki | wec | wrs | winbond)
- basic_machine=$field1-$field2
- os=
- ;;
- *)
- basic_machine=$field1
- os=$field2
- ;;
- esac
- ;;
- *)
- # Convert single-component short-hands not valid as part of
- # multi-component configurations.
- case $field1 in
- 386bsd)
- basic_machine=i386-pc
- os=bsd
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=udi
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=scout
- ;;
- am29k)
- basic_machine=a29k-none
- os=bsd
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=sysv
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=linux
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=cegcc
- ;;
- cray)
- basic_machine=j90-cray
- os=unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=unicosmp
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=msdosdjgpp
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=ebmon
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=ose
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=go32
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=sysv3
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=hpux
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=proelf
- ;;
- i386mach)
- basic_machine=i386-mach
- os=mach
- ;;
- vsta)
- basic_machine=i386-unknown
- os=vsta
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=linux
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=sysv
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=mingw32ce
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- os=moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- os=msdos
- ;;
- msys)
- basic_machine=i686-pc
- os=msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=sysv
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=nonstopux
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=os68k
- ;;
- paragon)
- basic_machine=i860-intel
- os=osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=linux
- ;;
- pw32)
- basic_machine=i586-unknown
- os=pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=coff
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=udi
- ;;
- sei)
- basic_machine=mips-sei
- os=seiux
- ;;
- sps7)
- basic_machine=m68k-bull
- os=sysv2
- ;;
- stratus)
- basic_machine=i860-stratus
- os=sysv4
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=solaris2
- ;;
- sv1)
- basic_machine=sv1-cray
- os=unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=unicos
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=tops20
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=vms
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=vxworks
- ;;
- xbox)
- basic_machine=i686-pc
- os=mingw32
- ;;
- ymp)
- basic_machine=ymp-cray
- os=unicos
- ;;
- *)
- basic_machine=$1
- os=
- ;;
- esac
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
- | avr | avr32 \
- | ba \
- | be32 | be64 \
- | bfin \
- | c4x | c8051 | clipper | csky \
- | d10v | d30v | dlx | dsp16xx \
- | e2k | epiphany \
- | fido | fr30 | frv | ft32 \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia16 | ia64 \
- | ip2k | iq2000 \
- | k1om \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r6 | mipsisa32r6el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r6 | mipsisa64r6el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nfp \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 | or1k | or1knd | or32 \
- | pdp10 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pru \
- | pyramid \
- | riscv32 | riscv64 \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
- | wasm32 \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
- basic_machine=$basic_machine-unknown
- os=${os:-none}
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
- ;;
- m9s12z | m68hcs12z | hcs12z | s12z)
- basic_machine=s12z-unknown
- os=${os:-none}
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
- ;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=${os:-none}
- ;;
- xscaleeb)
- basic_machine=armeb-unknown
- ;;
-
- xscaleel)
- basic_machine=armel-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | ba-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | e2k-* | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
- | ip2k-* | iq2000-* \
- | k1om-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa32r6-* | mipsisa32r6el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64r6-* | mipsisa64r6el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nfp-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | or1k*-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pru-* \
- | pyramid-* \
- | riscv32-* | riscv64-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | visium-* \
- | wasm32-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
- blackfin-*)
- basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=${os:-unicos}
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=bsd
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=${os:-elf}
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=${os:-elf}
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=${os:-bosx}
- ;;
- dpx2*)
- basic_machine=m68k-bull
- os=sysv3
- ;;
- e500v[12])
- basic_machine=powerpc-unknown
- os=$os"spe"
- ;;
- e500v[12]-*)
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=$os"spe"
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=${os:-bsd}
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=hiuxwe2
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
- i*86v32)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=sysv32
- ;;
- i*86v4*)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=sysv4
- ;;
- i*86v)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=sysv
- ;;
- i*86sol2)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=solaris2
- ;;
- j90 | j90-cray)
- basic_machine=j90-cray
- os=${os:-unicos}
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- irix*)
- ;;
- *)
- os=irix4
- ;;
- esac
- ;;
- leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=linux
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=mint
- ;;
- mips3*-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
- ;;
- ms1-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=newsos
- ;;
- next | m*-next)
- basic_machine=m68k-next
- case $os in
- nextstep* )
- ;;
- ns2*)
- os=nextstep2
- ;;
- *)
- os=nextstep3
- ;;
- esac
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- nsv-tandem)
- basic_machine=nsv-tandem
- ;;
- nsx-tandem)
- basic_machine=nsx-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=hiuxwe2
- ;;
- parisc-*)
- basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=${os:-elf}
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- simso-wrs)
- basic_machine=sparclite-wrs
- os=vxworks
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- w65*)
- basic_machine=w65-wdc
- os=none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=proelf
- ;;
- x64)
- basic_machine=x86_64-pc
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
- ;;
- none)
- basic_machine=none-none
- os=${os:-none}
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x$os != x ]
-then
-case $os in
- # First match some system type aliases that might get confused
- # with valid system types.
- # solaris* is a basic system type, with this one exception.
- auroraux)
- os=auroraux
- ;;
- bluegene*)
- os=cnk
- ;;
- solaris1 | solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- solaris)
- os=solaris2
- ;;
- unixware*)
- os=sysv4.2uw
- ;;
- gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # es1800 is here to avoid being matched by es* (a different OS)
- es1800*)
- os=ose
- ;;
- # Some version numbers need modification
- chorusos*)
- os=chorusos
- ;;
- isc)
- os=isc2.2
- ;;
- sco6)
- os=sco5v6
- ;;
- sco5)
- os=sco3.2v5
- ;;
- sco4)
- os=sco3.2v4
- ;;
- sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- ;;
- sco3.2v[4-9]* | sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- ;;
- scout)
- # Don't match below
- ;;
- sco*)
- os=sco3.2v2
- ;;
- psos*)
- os=psos
- ;;
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
- | aos* | aros* | cloudabi* | sortix* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
- | knetbsd* | mirbsd* | netbsd* \
- | bitrig* | openbsd* | solidbsd* | libertybsd* \
- | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
- | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
- | chorusrdb* | cegcc* | glidix* \
- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
- | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
- | linux-newlib* | linux-musl* | linux-uclibc* \
- | uxpv* | beos* | mpeix* | udk* | moxiebox* \
- | interix* | uwin* | mks* | rhapsody* | darwin* \
- | openstep* | oskit* | conix* | pw32* | nonstopux* \
- | storm-chaos* | tops10* | tenex* | tops20* | its* \
- | os2* | vos* | palmos* | uclinux* | nucleus* \
- | morphos* | superux* | rtmk* | windiss* \
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=nto-$os
- ;;
- esac
- ;;
- hiux*)
- os=hiuxwe2
- ;;
- nto-qnx*)
- ;;
- nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- sim | xray | os68k* | v88r* \
- | windows* | osx | abug | netware* | os9* \
- | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
- ;;
- linux-dietlibc)
- os=linux-dietlibc
- ;;
- linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- lynx*178)
- os=lynxos178
- ;;
- lynx*5)
- os=lynxos5
- ;;
- lynx*)
- os=lynxos
- ;;
- mac*)
- os=`echo "$os" | sed -e 's|mac|macos|'`
- ;;
- opened*)
- os=openedition
- ;;
- os400*)
- os=os400
- ;;
- sunos5*)
- os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
- ;;
- sunos6*)
- os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
- ;;
- wince*)
- os=wince
- ;;
- utek*)
- os=bsd
- ;;
- dynix*)
- os=bsd
- ;;
- acis*)
- os=aos
- ;;
- atheos*)
- os=atheos
- ;;
- syllable*)
- os=syllable
- ;;
- 386bsd)
- os=bsd
- ;;
- ctix* | uts*)
- os=sysv
- ;;
- nova*)
- os=rtmk-nova
- ;;
- ns2)
- os=nextstep2
- ;;
- nsk*)
- os=nsk
- ;;
- # Preserve the version number of sinix5.
- sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- sinix*)
- os=sysv4
- ;;
- tpf*)
- os=tpf
- ;;
- triton*)
- os=sysv3
- ;;
- oss*)
- os=sysv3
- ;;
- svr4*)
- os=sysv4
- ;;
- svr3)
- os=sysv3
- ;;
- sysvr4)
- os=sysv4
- ;;
- # This must come after sysvr4.
- sysv*)
- ;;
- ose*)
- os=ose
- ;;
- *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
- os=mint
- ;;
- zvmoe)
- os=zvmoe
- ;;
- dicos*)
- os=dicos
- ;;
- pikeos*)
- # Until real need of OS specific support for
- # particular features comes up, bare metal
- # configurations are quite functional.
- case $basic_machine in
- arm*)
- os=eabi
- ;;
- *)
- os=elf
- ;;
- esac
- ;;
- nacl*)
- ;;
- ios)
- ;;
- none)
- ;;
- *-eabi)
- ;;
- *)
- echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=elf
- ;;
- spu-*)
- os=elf
- ;;
- *-acorn)
- os=riscix1.2
- ;;
- arm*-rebel)
- os=linux
- ;;
- arm*-semi)
- os=aout
- ;;
- c4x-* | tic4x-*)
- os=coff
- ;;
- c8051-*)
- os=elf
- ;;
- clipper-intergraph)
- os=clix
- ;;
- hexagon-*)
- os=elf
- ;;
- tic54x-*)
- os=coff
- ;;
- tic55x-*)
- os=coff
- ;;
- tic6x-*)
- os=coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=tops20
- ;;
- pdp11-*)
- os=none
- ;;
- *-dec | vax-*)
- os=ultrix4.2
- ;;
- m68*-apollo)
- os=domain
- ;;
- i386-sun)
- os=sunos4.0.2
- ;;
- m68000-sun)
- os=sunos3
- ;;
- m68*-cisco)
- os=aout
- ;;
- mep-*)
- os=elf
- ;;
- mips*-cisco)
- os=elf
- ;;
- mips*-*)
- os=elf
- ;;
- or32-*)
- os=coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=sysv3
- ;;
- sparc-* | *-sun)
- os=sunos4.1.1
- ;;
- pru-*)
- os=elf
- ;;
- *-be)
- os=beos
- ;;
- *-ibm)
- os=aix
- ;;
- *-knuth)
- os=mmixware
- ;;
- *-wec)
- os=proelf
- ;;
- *-winbond)
- os=proelf
- ;;
- *-oki)
- os=proelf
- ;;
- *-hp)
- os=hpux
- ;;
- *-hitachi)
- os=hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=sysv
- ;;
- *-cbm)
- os=amigaos
- ;;
- *-dg)
- os=dgux
- ;;
- *-dolphin)
- os=sysv3
- ;;
- m68k-ccur)
- os=rtu
- ;;
- m88k-omron*)
- os=luna
- ;;
- *-next)
- os=nextstep
- ;;
- *-sequent)
- os=ptx
- ;;
- *-crds)
- os=unos
- ;;
- *-ns)
- os=genix
- ;;
- i370-*)
- os=mvs
- ;;
- *-gould)
- os=sysv
- ;;
- *-highlevel)
- os=bsd
- ;;
- *-encore)
- os=bsd
- ;;
- *-sgi)
- os=irix
- ;;
- *-siemens)
- os=sysv4
- ;;
- *-masscomp)
- os=rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=uxpv
- ;;
- *-rom68k)
- os=coff
- ;;
- *-*bug)
- os=coff
- ;;
- *-apple)
- os=macos
- ;;
- *-atari*)
- os=mint
- ;;
- *-wrs)
- os=vxworks
- ;;
- *)
- os=none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- riscix*)
- vendor=acorn
- ;;
- sunos*)
- vendor=sun
- ;;
- cnk*|-aix*)
- vendor=ibm
- ;;
- beos*)
- vendor=be
- ;;
- hpux*)
- vendor=hp
- ;;
- mpeix*)
- vendor=hp
- ;;
- hiux*)
- vendor=hitachi
- ;;
- unos*)
- vendor=crds
- ;;
- dgux*)
- vendor=dg
- ;;
- luna*)
- vendor=omron
- ;;
- genix*)
- vendor=ns
- ;;
- clix*)
- vendor=intergraph
- ;;
- mvs* | opened*)
- vendor=ibm
- ;;
- os400*)
- vendor=ibm
- ;;
- ptx*)
- vendor=sequent
- ;;
- tpf*)
- vendor=ibm
- ;;
- vxsim* | vxworks* | windiss*)
- vendor=wrs
- ;;
- aux*)
- vendor=apple
- ;;
- hms*)
- vendor=hitachi
- ;;
- mpw* | macos*)
- vendor=apple
- ;;
- *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
- vendor=atari
- ;;
- vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo "$basic_machine-$os"
-exit
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 9cc9eaf53..000000000
--- a/configure.ac
+++ /dev/null
@@ -1,630 +0,0 @@
-AC_PREREQ(2.57)
-
-###################
-# Required packages
-###################
-m4_define([boost_required_version], [1.50.0])
-m4_define([curl_required_version], [7.18.2])
-m4_define([ffms2_required_version], [2.16])
-m4_define([fftw3_required_version], [3.3])
-m4_define([fontconfig_required_version], [2.4])
-m4_define([freetype_required_version], [9.7.0])
-m4_define([hunspell_required_version], [1.2.0])
-m4_define([icu_required_version], [4.8.1.1])
-m4_define([libass_required_version], [0.9.7])
-m4_define([libpulse_required_version], [0.5])
-m4_define([pkgconfig_required_version], [0.20])
-m4_define([portaudio_required_version], [19])
-m4_define([wx_required_version], [3.0.0])
-
-#######
-# Setup
-#######
-AC_INIT([Aegisub], [aegisub_version],, [aegisub])
-: ${CFLAGS=""}
-: ${CXXFLAGS=""}
-AC_CONFIG_SRCDIR([src/main.cpp])
-AC_CONFIG_HEADER([acconf.h])
-AC_GNU_SOURCE
-AC_CANONICAL_HOST
-
-###########################
-# Check host architecture
-###########################
-build_darwin="no"
-build_linux="no"
-
-AS_CASE([$host],
- [*-*-darwin*], [build_darwin="yes"],
- [*-*-linux*], [build_linux="yes"])
-
-AC_SUBST(build_darwin)
-
-########################
-# Configurable variables
-########################
-# Name of aegisub binary.
-# This is tagged with the version on release branches.
-AEGISUB_COMMAND="aegisub"
-AC_SUBST(AEGISUB_COMMAND)
-AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable])
-
-# Name of gettext catalog.
-AEGISUB_CATALOG="aegisub"
-AC_SUBST(AEGISUB_CATALOG)
-AC_DEFINE_UNQUOTED([AEGISUB_CATALOG], ["${AEGISUB_CATALOG}"], [Name of the Aegisub gettext catalog])
-
-# Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec
-AC_ARG_WITH(desktop-dir,
- AS_HELP_STRING([--with-desktop-dir=PATH],[desktop file locations [PREFIX/share/applications]]))
-
-P_DESKTOP=${with_desktop_dir:-$datarootdir/applications}
-AC_SUBST(P_DESKTOP)
-
-# Handle location of icons: http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
-AC_ARG_WITH(icon-dir,
- AS_HELP_STRING([--with-icon-dir=PATH],[icon locations [PREFIX/share/icons]]))
-
-P_ICON=${with_icon_dir:-$datarootdir/icons}
-AC_SUBST(P_ICON)
-
-# Install prefix
-# If a user doesn't supply --prefix then it is set to NONE so we
-# set it to $ac_default_prefix if it hasn't been supplied.
-AS_CASE([x$prefix], [xNONE | x], [prefix="$ac_default_prefix"], [])
-
-# Install prefix used by wxStandardPaths::SetInstallPrefix.
-AC_DEFINE_UNQUOTED([INSTALL_PREFIX], ["$prefix"], [Default install prefix, or --prefix.])
-
-# Build credit
-AC_ARG_WITH(build-credit,
- AS_HELP_STRING([--with-build-credit=NAME],[Build credit shown in the program title.]),
- [use_build_credit="yes"])
-
-AC_MSG_CHECKING([whether BUILD_CREDIT has been set])
-AS_IF([test x$use_build_credit = xyes],
- AS_IF([test x$with_build_credit = xyes || test -z "$with_build_credit"], [
- AC_MSG_FAILURE([You must set a value eg --with-build-credit=])
- ], [
- AC_MSG_RESULT([yes ($with_build_credit)])
- AC_DEFINE_UNQUOTED([BUILD_CREDIT], ["$with_build_credit"], [Build credit supplied in application title using --with-build-credit=])
- ]),
- [AC_MSG_RESULT([no])])
-
-####################
-# Check for programs
-####################
-CHECK_GNU_MAKE
-AC_PROG_CC
-AC_PROG_CXX
-AC_LANG(C++)
-AM_PROG_CC_C_O
-# This is reported to be required on Ubuntu, I haven't had time to check.
-define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
-
-#################
-# Developers only
-#################
-AC_MSG_CHECKING([for version])
-. $srcdir/build/version.sh "$srcdir"
-AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE])
-
-AC_MSG_CHECKING([for build date])
-BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"`
-AC_MSG_RESULT($BUILD_DATE)
-
-AC_SUBST([BUILD_GIT_VERSION_STRING])
-AC_SUBST([BUILD_DATE])
-
-###################################################
-# Check for pthreads and setup variables / compiler
-###################################################
-AS_IF([test x$build_darwin != xyes], [
- ACX_PTHREAD([], [AC_MSG_FAILURE([You must have working pthreads.])])
- CC="$PTHREAD_CC"
-])
-
-######################
-# Check compiler flags
-######################
-AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]]))
-
-AS_IF([test x$enable_compiler_flags != xno], [
- CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g"
- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g"
- AC_CXX_FLAG([-std=c++11])
- AC_CXX_FLAG([-Wno-c++11-narrowing])
- AC_C_FLAG([-Wno-unused-local-typedefs])
- AC_CXX_FLAG([-Wno-unused-local-typedefs])
-
- # -O* messes with debugging.
- AS_IF([test x$enable_debug = xyes], [
- CFLAGS="$CFLAGS -O0"
- CXXFLAGS="$CXXFLAGS -O0"
- ], [
- CFLAGS="$CFLAGS -O3"
- CXXFLAGS="$CXXFLAGS -O3"
- ])
-])
-
-AC_ARG_WITH([libc++], AS_HELP_STRING([--with-libc++],[Use libc++ rather than libstdc++. [auto]]))
-AS_IF([test x$with_libc__ != xno], [
- AC_LANG_PUSH(C++)
- ac_ld_flag_save="$LDFLAGS"
- LDFLAGS="$LDFLAGS -stdlib=libc++"
- AC_MSG_CHECKING([[whether $CXX supports -stdlib=libc++]])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]])], [
- AC_MSG_RESULT([yes])
- CXXFLAGS="$CXXFLAGS -stdlib=libc++"
- ], [
- AS_IF([test x$with_libc__ = xyes], [
- AC_MSG_FAILURE([no])
- ], [
- LDFLAGS="$ac_ld_flag_save"
- AC_MSG_RESULT([no])
- ])
- ])
- AC_LANG_POP(C++)
-])
-
-######################################
-# Check Headers / Features / Libraries
-######################################
-AC_CHECK_LIB([m], [main])
-AC_CHECK_LIB([dl], [dlclose])
-AC_CHECK_HEADERS([sys/time.h])
-
-AC_ARG_ENABLE(sanity-checks,
- AS_HELP_STRING([--disable-sanity-checks],[Skip verifying that found libraries work.]))
-
-##############################
-# Program Support and Features
-##############################
-#########################
-### Required Dependencies
-#########################
-
-AS_IF([test x$build_darwin != xyes], [
- AC_PATH_XTRA
- AS_IF([test x$no_x = xyes],
- [AC_MSG_FAILURE([You must have a working copy of X installed.])])
-
- AX_CHECK_GL
- AS_IF([test x$no_gl = xyes], [AC_MSG_FAILURE([Aegisub requires GL support.])])
-], [
- AC_CHECK_HEADERS([OpenGL/gl.h])
-])
-AC_SUBST(GL_CFLAGS)
-AC_SUBST(GL_LIBS)
-
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version)
-
-AS_IF([test x$build_darwin != xyes], [
- PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
- FONTCONFIG_CONF_DIR=$($PKG_CONFIG --variable=confdir fontconfig)
- AC_SUBST(FONTCONFIG_CONF_DIR)
-])
-
-PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
-
-AX_BOOST_BASE([boost_required_version])
-AX_BOOST_CHRONO
-AX_BOOST_FILESYSTEM
-AX_BOOST_LOCALE
-AX_BOOST_REGEX
-AX_BOOST_SYSTEM
-AX_BOOST_THREAD
-
-cppflags_bak="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-AC_CHECK_HEADERS([boost/spirit/home/phoenix/version.hpp])
-CPPFLAGS=$cppflags_bak
-
-AC_DEFINE(BOOST_SYSTEM_NO_DEPRECATED, 1,
- [Disable deprecated parts of boost.system])
-AC_DEFINE(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION, 1,
- [Disable boost.serialization support for boost.multi_index])
-
-PKG_CHECK_MODULES(ICU_UC, icu-uc >= icu_required_version)
-PKG_CHECK_MODULES(ICU_I18N, icu-i18n >= icu_required_version)
-
-########
-## boost
-########
-AS_IF([test x$enable_sanity_checks != xno], [
- AC_AGI_COMPILE([boost ICU support], [boost_icu], [$BOOST_CPPFLAGS],
- [$BOOST_LDFLAGS $BOOST_REGEX_LIB $ICU_UC_LIBS $ICU_I18N_LIBS],[
- #include
- int main() {
- auto regex = boost::make_u32regex(".", boost::u32regex::perl);
- boost::smatch result;
- u32regex_search("a", result, regex, boost::match_default);
- } ])
-
- AS_IF([test x$agi_cv_with_boost_icu = xno],
- [AC_MSG_FAILURE([Aegisub requires that boost be built with ICU support.])])
-])
-
-########
-## iconv
-########
-AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv []])
-AC_ARG_VAR([ICONV_LIBS], [LIBS to use for iconv [-liconv]])
-
-AS_IF([test -z "$ICONV_LIBS"], AC_SEARCH_LIBS([iconv_open], [iconv]))
-
-AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LIBS],[
-#include
-int main() {
- return !iconv_open("UTF-8", "UTF-8");
-} ])
-
-AC_SUBST(ICONV_LIBS)
-AC_SUBST(ICONV_CFLAGS)
-
-AS_IF([test x$agi_cv_with_iconv = xno], [AC_MSG_FAILURE([Please install a working iconv library.])])
-
-AC_AGI_COMPILE([iconv (const)], [iconv_const], [$ICONV_CFLAGS], [$ICONV_LIBS],[
-#include
-int main(void) {
- iconv_t cd = iconv_open("UTF-16", "UTF-8");
- const char *in = "in";
- char *out = new char();
- size_t res, inbytesleft, outbytesleft;
- res = iconv(cd, &in, &inbytesleft, &out, &outbytesleft);
- return 0;
-} ])
-
-AS_IF([test x$agi_cv_with_iconv_const = xyes],
- [AC_DEFINE(AGI_ICONV_CONST, 1, [Enable if iconv expects the in argument to be const])])
-
-###############
-# Audio Players
-###############
-#######
-## ALSA
-#######
-AC_ARG_WITH(alsa,
- AS_HELP_STRING([--without-alsa],
- [build without ALSA audio player [auto]]))
-
-AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA []])
-AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA [-lasound -lrt]])
-
-ALSA_LIBS=${ALSA_LIBS:--lasound -lrt}
-
-AS_IF([test x$with_alsa = xno],
- [alsa_disabled="(disabled)"],
- [AC_CHECK_LIB([asound], [snd_pcm_open], [with_alsa="yes"], [with_alsa="no"], $ALSA_LIBS)])
-
-AS_IF([test x$with_alsa = xyes], AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support]))
-
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-AC_SUBST(with_alsa)
-
-#########
-## OpenAL
-#########
-AC_ARG_WITH(openal,
- AS_HELP_STRING([--without-openal],
- [build without OpenAL audio player [auto]]))
-
-AS_IF([test x$build_darwin = xyes], [
- OPENAL_LIBS="-framework OpenAL"
- OPENAL_CFLAGS=""
- AC_SUBST(OPENAL_LIBS)
- AC_SUBST(OPENAL_CFLAGS)
- with_openal="yes"
-],
- [test x$with_openal = xno], [openal_disabled="(disabled)"],
- [PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [with_openal=yes], [with_openal=no])])
-
-AS_IF([test x$with_openal != xno], [
- AC_AGI_COMPILE([OpenAL], [openal], [$OPENAL_CFLAGS], [$OPENAL_LIBS],[
-#if defined(__APPLE__)
-#include
-#include
-#else
-#include
-#include
-#endif
-int main(void) {
- ALCdevice *device = alcOpenDevice(0);
- if (!device) return 1;
- ALCcontext *context = alcCreateContext(device, 0);
- if (!context) return 1;
- return 0;
-} ])
-])
-
-AS_IF([test x$agi_cv_with_openal = xno && test x$with_openal = xyes], [
- AC_MSG_WARN([OpenAL detected, but it doesn''t work...])
- with_openal="no"
-])
-
-AS_IF([test x$agi_cv_with_openal = xyes && test x$with_openal = xyes],
- AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support]))
-
-AC_SUBST(with_openal)
-
-######
-## OSS
-######
-AC_ARG_VAR([OSS_CFLAGS], [CFLAGS to use for OSS [auto]])
-AC_ARG_WITH(oss,
- AS_HELP_STRING([--without-oss],
- [build without OSS audio player [auto]]))
-
-AS_IF([test x$with_oss = xno], [oss_disabled="(disabled)"], [
- AS_IF([test -z "$OSS_CFLAGS" && test -f "/etc/oss.conf"], [
- . /etc/oss.conf
- OSS_CFLAGS="-I${OSSLIBDIR}/include/sys"
- ])
- AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [with_oss="yes"], [with_oss="no"])
-])
-
-AS_IF([test x$with_oss = xyes], AC_DEFINE(WITH_OSS, 1, [Enable OSS support]))
-
-AC_SUBST(with_oss)
-
-###################
-# Simple pkg-config stuff
-###################
-AGI_OPT_PKG(libpulse, [build without PulseAudio audio player [auto]], [Enable PulseAudio support])
-AGI_OPT_PKG(portaudio-2.0, [build without PortAudio v19 audio player [auto]], [Enable PortAudio v19 support])
-
-AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 support])
-
-AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
-AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
-AGI_OPT_PKG(uchardet, [build without automatic character set detection [auto]], [Enable uchardet support])
-
-########
-# LuaJIT
-########
-system_luajit="bundled"
-AC_ARG_WITH(system-luajit, AS_HELP_STRING([--without-system-luajit], [Use built-in LuaJIT [auto]]))
-# Check if it's available at all
-AS_IF([test x$with_system_luajit = xno], [],
- [PKG_CHECK_MODULES(LUAJIT, luajit >= 2.0.0, [], [
- AS_IF([test x$with_system_luajit = xyes],
- [AC_MSG_FAILURE([--with-sytem-luajit was specified, but luajit could not be found])])
- with_system_luajit="no"])])
-
-# Check if it's compiled in Lua 5.2 mode
-# This check can be skipped by manually setting agi_cv_luajit_is_52
-AS_IF([test x$with_system_luajit != xno], [
- aegisub_save_LIBS="$LIBS"
- aegisub_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LUAJIT_CFLAGS"
- LIBS="$LIBS $LUAJIT_LIBS"
- AC_CACHE_CHECK(
- [whether LuaJIT is compiled in 5.2 mode], [agi_cv_luajit_is_52],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [[#include ]],
- [[lua_State *L = luaL_newstate();
- if (!L) return 1;
- // This is valid in lua 5.2, but a syntax error in 5.1
- const char testprogram[] = "function foo() while true do break return end end";
- return luaL_loadstring(L, testprogram) == LUA_ERRSYNTAX;
- ]])], [agi_cv_luajit_is_52="yes"], [agi_cv_luajit_is_52="no"])])
- CPPFLAGS="$aegisub_save_CPPFLAGS"
- LIBS="$aegisub_save_LIBS"
-
- if test $agi_cv_luajit_is_52 != yes; then
- AS_IF([test x$with_system_luajit = xyes],
- [AC_MSG_FAILURE([LuaJIT must be compiled in Lua 5.2 mode])])
- with_system_luajit="no"
- else
- with_system_luajit="yes"
- system_luajit="system"
- fi
-])
-
-AS_IF([test $with_system_luajit = no],
- [AC_SUBST([LUAJIT_CFLAGS], ['-I$(TOP)vendor/luajit/include'])
- AC_SUBST([LUAJIT_LIBS], ['$(TOP)vendor/luajit/src/libluajit.a'])])
-
-# We also need a Lua binary to run part of the build system
-# Which version doesn't matter as the scripts are portable between them
-AC_CHECK_PROGS([LUA], [lua luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1])
-
-# If the user doesn't have an installed copy of Lua, just use the one built
-# as part of building LuaJIT
-AS_IF([test -z $LUA], [LUA='$(TOP)vendor/luajit/src/host/minilua'])
-
-######################################################
-# Debugging support
-######################################################
-AC_MSG_CHECKING([whether to turn on debugging])
-AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[enable debugging [no]]))
-AC_MSG_RESULT([${enable_debug:=no}])
-
-AC_MSG_CHECKING([whether to use exception handling in debug mode])
-AC_ARG_ENABLE(debug-exceptions, AS_HELP_STRING([--enable-debug-exceptions],[enable exception handling in debug mode [no]]))
-AC_MSG_RESULT([${enabled_debug_exceptions:=no}])
-
-AS_IF([test x$enable_debug_exceptions = xyes],
- [AC_DEFINE(WITH_EXCEPTIONS, 1,
- [Enable exception handling in debug mode. (--enable-debug) This is always enabled when debug mode is off.])])
-
-################
-# Widget support
-################
-WX_CONFIG_OPTIONS
-WX_STANDARD_OPTIONS([debug])
-WX_DEBUG=$DEBUG
-WX_UNICODE=$UNICODE
-WX_CONFIG_CHECK([wx_required_version],,,[std,gl,stc],[$WXCONFIG_FLAGS])
-AC_SUBST(WX_CONFIG_PATH)
-
-AS_IF([test x$WX_VERSION = x],
- [AC_MSG_FAILURE([wxWidgets detection failed, please set --with-wx* or add the libraries to your LIBS, CXX/CFLAGS.])])
-
-AS_IF([test x$enable_sanity_checks != xno], [
- AC_AGI_LINK([wxWidgets OpenGL support], [wxopengl], [wx/glcanvas.h], [$GL_CFLAGS $WX_CFLAGS], [$GL_LIBS $WX_LIBS],[
-#include
-int main(void) {
- wxGLCanvas *canvas;
- wxGLContext *context;
- return 0;
-} ])
- AC_AGI_LINK([wxWidgets StyledTextCtrl support], [wxstc], [wx/stc/stc.h], [$WX_CFLAGS], [$WX_LIBS],[
-#include
-int main(void) {
- wxStyledTextCtrl *canvas;
- return 0;
-} ])
-])
-
-AS_IF([test x$with_agi_cv_wxopengl = xno], AC_MSG_FAILURE([wxWidgets OpenGL support missing]))
-AS_IF([test x$with_agi_cv_wxstc = xno], AC_MSG_FAILURE([wxWidgets StyledTextCtrl support missing]))
-
-# This turns on some internal (to aegisub) debugging features.
-# A debug version of wxWidgets is required.
-AS_IF([test x$enable_debug = xyes],
- [AS_IF([$WX_CONFIG_PATH --debug],[AC_CXX_FLAG([-D_DEBUG])])])
-
-############################
-# Precompiled Header Support
-# Only works with gcc! (and clang)
-############################
-AC_MSG_CHECKING([whether to use precompiled headers])
-AC_ARG_ENABLE(gcc-prec, AS_HELP_STRING([--disable-gcc-prec],[disable GCC precompiled headers]))
-AC_MSG_RESULT([${enable_gcc_prec:=yes}])
-AC_SUBST(enable_gcc_prec)
-AC_PCH_FLAG([-Winvalid-pch])
-AC_PCH_FLAG([-fpch-deps])
-AC_PCH_FLAG([-fpch-preprocess])
-
-##############################
-# Internationalisation support
-##############################
-AM_GNU_GETTEXT([external])
-
-################
-# Update checker
-################
-AC_MSG_CHECKING([whether to enable the update checker])
-AC_ARG_ENABLE(update-checker,
- AS_HELP_STRING([--disable-update-checker], [disable the update checker [no]]))
-AC_MSG_RESULT(${enable_update_checker:=yes})
-AS_IF([test "x$enable_update_checker" != "xno"],
- [AC_DEFINE([WITH_UPDATE_CHECKER], [],
- [Whether to enable the update checker])])
-
-AC_MSG_CHECKING([for update checker server])
-AC_ARG_WITH(update-server,
- AS_HELP_STRING([--with-update-server=HOSTNAME],
- [Server to use for the update checker
- [updates.aegisub.org]]))
-AC_MSG_RESULT(${with_update_server:=updates.aegisub.org})
-AC_DEFINE_UNQUOTED([UPDATE_CHECKER_SERVER], ["$with_update_server"],
- [Server for the update checker])
-
-AC_MSG_CHECKING([for update checker base URL])
-AC_ARG_WITH(update-url,
- AS_HELP_STRING([--with-update-url=HOSTNAME],
- [Base path to use for the update checker [/trunk]]))
-AC_MSG_RESULT(${with_update_url:=/trunk})
-AC_DEFINE_UNQUOTED([UPDATE_CHECKER_BASE_URL], ["$with_update_url"],
- [Base path for the update checker])
-
-####################################################################
-# Default settings for Providers/Players
-# * This is done at the end to preserve sanity rather than littering
-# it above.
-####################################################################
-AC_ARG_WITH(player-audio,
- AS_HELP_STRING([--with-player-audio=(ALSA|OpenAL|PortAudio|PulseAudio|OSS)],
- [Default Audio Player [Linux/ALSA, Darwin/OpenAL, 1:*/OSS, 2:*/PortAudio]]))
-
-# Default audio player.
-AS_IF([test -z "$with_player_audio"], [
- AS_IF([test x$build_linux = xyes && test x$with_alsa = xyes], [DEFAULT_PLAYER_AUDIO="ALSA"],
- [test x$build_darwin = xyes && test x$with_openal = xyes], [DEFAULT_PLAYER_AUDIO="OpenAL"],
- [test x$with_portaudio = xyes], [DEFAULT_PLAYER_AUDIO="PortAudio"],
- [test x$with_oss = xyes], [DEFAULT_PLAYER_AUDIO="OSS"],
- [test x$with_alsa = xyes], [DEFAULT_PLAYER_AUDIO="ALSA"],
- [test x$with_openal = xyes], [DEFAULT_PLAYER_AUDIO="OpenAL"],
- [test x$with_libpulse = xyes], [DEFAULT_PLAYER_AUDIO="PulseAudio"])],
- [DEFAULT_PLAYER_AUDIO="$with_player_audio"])
-AC_SUBST(DEFAULT_PLAYER_AUDIO)
-
-# Set some friendly strings if some of the above aren't detected.
-DEFAULT_PLAYER_AUDIO=${DEFAULT_PLAYER_AUDIO:-NONE}
-
-###############
-# Misc settings
-###############
-# Files that need substitution.
-AC_CONFIG_FILES([
-packages/desktop/aegisub.desktop.template
-src/libresrc/default_config_platform.json
-tools/osx-bundle.sed
-Makefile.inc
-])
-
-AC_OUTPUT
-
-AS_IF([test x"$DEFAULT_PLAYER_AUDIO" = xNONE], AC_MSG_NOTICE([
-
-***********************************************************************
-* No supported audio player interface was found on your system.
-* If you want audio support in Aegisub you need to install one of
-* these libraries:
-* - PulseAudio
-* * http://pulseaudio.org/
-* - ALSA (Linux only)
-* * http://www.alsa-project.org/
-* - PortAudio (version 19 only)
-* * http://www.portaudio.com/
-***********************************************************************
-]))
-
-AS_IF([test x$with_ffms2 != xyes], [AC_MSG_NOTICE([
-
-***********************************************************************
-* No supported video/audio reader interface was found on your system.
-* You will not be able to open any video or audio files in Aegisub
-* unless you install a supported video/audio provider.
-* You will however still be able to open "dummy" video, ie. a blank,
-* virtual video clip with subtitles overlaid.
-* Currently we only support one video/audio provider on non-Windows
-* systems:
-* - FFMS2
-* * http://github.com/FFMS/ffms2
-***********************************************************************
-])])
-
-AC_MSG_RESULT([
-Configure settings
- Install prefix: $prefix
- Revision: $BUILD_GIT_VERSION_STRING
- Debug $enable_debug
- CFLAGS $CFLAGS
- CXXFLAGS $CXXFLAGS
- CPPFLAGS $CPPFLAGS
- LDFLAGS $LDFLAGS
- LIBS $LIBS
-
-Default Settings
- Audio Player: $DEFAULT_PLAYER_AUDIO
-
-Audio Players
- ALSA: $with_alsa $alsa_disabled
- OpenAL: $with_openal $openal_disabled
- OSS: $with_oss $oss_disabled
- PortAudio: $with_portaudio $portaudio_disabled
- PulseAudio: $with_libpulse $libpulse_disabled
-
-Misc Packages
- uchardet: $with_uchardet $uchardet_disabled
- Hunspell: $with_hunspell $hunspell_disabled
- FFTW3: $with_fftw3 $fftw3_disabled
- LuaJIT: $system_luajit
-])
diff --git a/header.mk b/header.mk
deleted file mode 100644
index 613b38ff1..000000000
--- a/header.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-d := $(abspath $(dir $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))))/
-
-ifndef TOP
-TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/
-include $(TOP)Makefile.inc
-
-subdirs := \
- automation \
- libaegisub \
- packages/desktop \
- po \
- src \
- tests \
- tools \
- vendor/luabins \
- vendor/luajit
-
-subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
-
-INCLUDING_CHILD_MAKEFILES=yes
-d_save := $d
-$(foreach dir,$(filter-out $(abspath $(MAKEFILE_LIST)),$(subdirs)), $(eval include $(dir)))
-d := $(d_save)
-INCLUDING_CHILD_MAKEFILES=no
-
-DISTCLEANFILES += \
- $(TOP)acconf.h \
- $(TOP)configure \
- $(TOP)acconf.h.in~ \
- $(TOP)build/git_version.h \
- $(TOP)Makefile.inc \
- $(TOP)config.log \
- $(TOP)acconf.h.in \
- $(TOP)config.status \
- $(TOP)autom4te.cache \
- $(TOP)aclocal.m4 \
-
-define MKDIR_INSTALL
-@$(BIN_MKDIR_P) $(dir $@)
-$(BIN_INSTALL) -m644 $< $@
-endef
-
-endif
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 0360b79e7..000000000
--- a/install-sh
+++ /dev/null
@@ -1,501 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2016-01-11.22; # 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; won't work
- # if double slashes aren't ignored.
- 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
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- dstdir=`dirname "$dst"`
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- 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.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 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=$dstdir/_inst.$$_
- rmtmp=$dstdir/_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 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/libaegisub/Makefile b/libaegisub/Makefile
deleted file mode 100644
index 76fc8d6e4..000000000
--- a/libaegisub/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
-
-aegisub_OBJ := \
- $(d)common/parser.o \
- $(d)ass/dialogue_parser.o \
- $(d)ass/time.o \
- $(d)ass/uuencode.o \
- $(patsubst %.cpp,%.o,$(sort $(wildcard $(d)audio/*.cpp))) \
- $(patsubst %.cpp,%.o,$(sort $(wildcard $(d)common/cajun/*.cpp))) \
- $(patsubst %.cpp,%.o,$(sort $(wildcard $(d)lua/modules/*.cpp))) \
- $(patsubst %.c,%.o,$(sort $(wildcard $(d)lua/modules/*.c))) \
- $(patsubst %.cpp,%.o,$(sort $(wildcard $(d)lua/*.cpp))) \
- $(patsubst %.cpp,%.o,$(sort $(wildcard $(d)unix/*.cpp))) \
- $(d)common/calltip_provider.o \
- $(d)common/character_count.o \
- $(d)common/charset.o \
- $(d)common/charset_6937.o \
- $(d)common/charset_conv.o \
- $(d)common/color.o \
- $(d)common/file_mapping.o \
- $(d)common/format.o \
- $(d)common/fs.o \
- $(d)common/hotkey.o \
- $(d)common/io.o \
- $(d)common/json.o \
- $(d)common/kana_table.o \
- $(d)common/karaoke_matcher.o \
- $(d)common/keyframe.o \
- $(d)common/line_iterator.o \
- $(d)common/log.o \
- $(d)common/mru.o \
- $(d)common/option.o \
- $(d)common/option_value.o \
- $(d)common/path.o \
- $(d)common/thesaurus.o \
- $(d)common/util.o \
- $(d)common/vfr.o \
- $(d)common/ycbcr_conv.o
-
-ifeq (yes, $(BUILD_DARWIN))
-aegisub_OBJ += $(patsubst %.mm,%.o,$(sort $(wildcard $(d)osx/*.mm)))
-else
-aegisub_OBJ += $(d)common/dispatch.o
-endif
-
-aegisub_PCH := $(d)lagi_pre.h
-aegisub_CPPFLAGS := -I$(d)include -I$(TOP) $(CPPFLAGS_BOOST) $(CFLAGS_LUA) $(CFLAGS_PTHREAD)
-
-$(d)common/charset.o_FLAGS := $(CFLAGS_UCHARDET)
-$(d)common/charset_conv.o_FLAGS := $(CFLAGS_ICONV)
-$(d)common/parser.o_FLAGS := -ftemplate-depth=256
-$(d)unix/path.o_FLAGS := -DP_DATA=\"$(P_DATA)\"
-
-LIB += aegisub
-
-include $(TOP)Makefile.target
diff --git a/m4macros/ac_agi.m4 b/m4macros/ac_agi.m4
deleted file mode 100644
index e45a54767..000000000
--- a/m4macros/ac_agi.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-AC_DEFUN([AC_AGI_COMPILE],[
- aegisub_save_LIBS="$LIBS"
- aegisub_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $3"
- LIBS="$LIBS $4"
- AC_LANG_PUSH(C++)
- AC_CACHE_CHECK(
- [whether $1 works], [agi_cv_with_$2],
- [AC_RUN_IFELSE([AC_LANG_SOURCE([$5])],
- [eval agi_cv_with_$2="yes"],
- [eval agi_cv_with_$2="no"],
- [AS_IF([test $? -ne 0], [eval agi_cv_with_$2="no"], [eval agi_cv_with_$2="yes"])])])
- AC_LANG_POP(C++)
- CPPFLAGS="$aegisub_save_CPPFLAGS"
- LIBS="$aegisub_save_LIBS"
-])
-
-AC_DEFUN([AC_AGI_LINK],[
- aegisub_save_LIBS="$LIBS"
- aegisub_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $4"
- LIBS="$LIBS $5"
- AC_CHECK_HEADER([$3], [agi_cv_header="yes"], [agi_cv_header="no"])
- AS_IF([test "x$agi_cv_header" = xyes],
- [AC_CACHE_CHECK(
- [whether $1 works], [agi_cv_with_$2],
- [AC_LINK_IFELSE([AC_LANG_SOURCE([$6])], [eval agi_cv_with_$2="yes"], [eval agi_cv_with_$2="no"])])]
- [eval agi_cv_with_$2="no"])
- CPPFLAGS="$aegisub_save_CPPFLAGS"
- LIBS="$aegisub_save_LIBS"
-])
-
-# An optional dependency which requires pkg-config
-# Args: Name, AC_ARG_WITH help string, AC_DEFINE help string
-AC_DEFUN([AGI_OPT_PKG], [
- m4_define([varname], m4_bpatsubst([$1], [-.*], []))dnl
- m4_define([upper], m4_translit(varname, [a-z], [A-Z]))dnl
-
- AC_ARG_WITH(varname, AS_HELP_STRING([--without-][varname], [$2]))
- AS_IF([test x$with_]varname[ = xno],
- varname[_disabled="(disabled)"],
- [PKG_CHECK_MODULES(upper, $1 >= varname[]_required_version, [
- AC_DEFINE([WITH_]upper, 1, $3)
- with_[]varname="yes"
- ], [
- AS_IF([test x$with_]varname[ = xyes],
- [AC_MSG_FAILURE([--with-]varname[ was specified, but ]varname[ could not be found])])
- with_[]varname="no"
- ])])
- AC_SUBST([with_]varname)
-])
diff --git a/m4macros/ac_flag.m4 b/m4macros/ac_flag.m4
deleted file mode 100644
index 7b22ccad0..000000000
--- a/m4macros/ac_flag.m4
+++ /dev/null
@@ -1,56 +0,0 @@
-AC_DEFUN([AC_C_FLAG], [{
- AC_LANG_PUSH(C)
- ac_c_flag_save="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $1"
- AC_MSG_CHECKING([[whether $CC supports $1]])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]])],
- [
- CFLAGS="$ac_c_flag_save $1"
- AC_MSG_RESULT([yes])
- ], [
- CFLAGS="$ac_c_flag_save"
- AC_MSG_RESULT([no])
- $2
- ])
- AC_LANG_POP(C)
- }])
-AC_DEFUN([AC_CXX_FLAG], [{
- AC_LANG_PUSH(C++)
- ac_cxx_flag_save="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -Werror $1"
- AC_MSG_CHECKING([[whether $CXX supports $1]])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]])],
- [
- CXXFLAGS="$ac_cxx_flag_save $1"
- AC_MSG_RESULT([yes])
- ],
- [
- CXXFLAGS="$ac_cxx_flag_save"
- AC_MSG_RESULT([no])
- $2
- ])
- AC_LANG_POP(C++)
- }])
-AC_DEFUN([AC_PCH_FLAG], [{
- AC_LANG_PUSH(C++)
- ac_cxx_flag_save="$CXXFLAGS"
- ac_cxx_werror_flag_save="$ac_cxx_werror_flag"
- ac_cxx_werror_flag=yes
- CXXFLAGS="$CXXFLAGS -Werror $1"
- AC_MSG_CHECKING([[whether $CXX supports $1]])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]])],
- [
- PCHFLAGS="$PCHFLAGS $1"
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- $2
- ])
- CXXFLAGS="$ac_cxx_flag_save"
- ac_cxx_werror_flag="$ac_cxx_werror_flag_save"
- AC_LANG_POP(C++)
- }])
diff --git a/m4macros/agi_find_libheader.m4 b/m4macros/agi_find_libheader.m4
deleted file mode 100644
index 7d1dea637..000000000
--- a/m4macros/agi_find_libheader.m4
+++ /dev/null
@@ -1,58 +0,0 @@
-AC_DEFUN([AGI_FIND_HEADER],[
- file=`echo $2 | $as_tr_sh`
-
- aegisub_save_CPPFLAGS="$CPPFLAGS"
-
- for dir in $3; do
- vdir=`echo $dir | $as_tr_sh`
- CPPFLAGS="-I$dir"
- AC_CACHE_CHECK(
- [for $2 in $dir],
- [agi_cv_header_${vdir}_${file}],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <$2>])],
- [eval agi_cv_header_${vdir}_${file}="yes"; found="${dir}"],
- [eval agi_cv_header_${vdir}_${file}="no"; found=""])
- ])
-
- if test -n "$found"; then
- break;
- fi
- done
-
- if test -n "$found"; then
- $1_CFLAGS="-I$found"
- fi
- CPPFLAGS="$aegisub_save_CPPFLAGS"
-])
-
-
-AC_DEFUN([AGI_FIND_LIB],[
- aegisub_save_LIBS="$LIBS"
-
- if test -n "$3"; then
- LDDIR="-L$3"
- fi
-
- for lib in $2; do
- vlib=`echo $lib | $as_tr_sh`
- LIBS="$LDDIR -l$lib"
- AC_CACHE_CHECK(
- [for -l${lib}],
- [agi_cv_lib_${vlib}],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM()],
- [eval agi_cv_lib_${vlib}="yes"; found="${lib}"],
- [eval agi_cv_lib_${vlib}="no"; found=""])
- ])
-
- if test -n "$found"; then
- break;
- fi
- done
-
- if test -n "$found"; then
- $1_LIBS="$LDDIR -l$found"
- fi
- LIBS="$aegisub_save_LIBS"
-])
diff --git a/m4macros/ax_boost_base.m4 b/m4macros/ax_boost_base.m4
deleted file mode 100644
index 478050ff0..000000000
--- a/m4macros/ax_boost_base.m4
+++ /dev/null
@@ -1,301 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# DESCRIPTION
-#
-# Test for the Boost C++ libraries of a particular version (or newer)
-#
-# If no path to the installed boost library is given the macro searchs
-# under /usr, /usr/local, /opt and /opt/local and evaluates the
-# $BOOST_ROOT environment variable. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
-#
-# And sets:
-#
-# HAVE_BOOST
-#
-# LICENSE
-#
-# Copyright (c) 2008 Thomas Porschberg
-# Copyright (c) 2009 Peter Adolphs
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 42
-
-# example boost program (need to pass version)
-m4_define([_AX_BOOST_BASE_PROGRAM],
- [AC_LANG_PROGRAM([[
-#include
-]],[[
-(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
-]])])
-
-AC_DEFUN([AX_BOOST_BASE],
-[
-AC_ARG_WITH([boost],
- [AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
- [use Boost library from a standard location (ARG=yes),
- from the specified location (ARG=),
- or disable it (ARG=no)
- @<:@ARG=yes@:>@ ])],
- [
- AS_CASE([$withval],
- [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
- [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
- [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
- ],
- [want_boost="yes"])
-
-
-AC_ARG_WITH([boost-libdir],
- [AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
- [Force given directory for boost libraries.
- Note that this will override library path detection,
- so use this parameter only if default library detection fails
- and you know exactly where your boost libraries are located.])],
- [
- AS_IF([test -d "$withval"],
- [_AX_BOOST_BASE_boost_lib_path="$withval"],
- [AC_MSG_ERROR([--with-boost-libdir expected directory name])])
- ],
- [_AX_BOOST_BASE_boost_lib_path=""])
-
-BOOST_LDFLAGS=""
-BOOST_CPPFLAGS=""
-AS_IF([test "x$want_boost" = "xyes"],
- [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
-AC_SUBST(BOOST_CPPFLAGS)
-AC_SUBST(BOOST_LDFLAGS)
-])
-
-
-# convert a version string in $2 to numeric and affect to polymorphic var $1
-AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
- AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
- _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
- _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
- AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
- [AC_MSG_ERROR([You should at least specify libboost major version])])
- _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
- AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
- [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
- _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
- [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
- _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
- AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
-])
-
-dnl Run the detection of boost should be run only if $want_boost
-AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
- _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
- succeeded=no
-
-
- AC_REQUIRE([AC_CANONICAL_HOST])
- dnl On 64-bit systems check for system libraries in both lib64 and lib.
- dnl The former is specified by FHS, but e.g. Debian does not adhere to
- dnl this (as it rises problems for generic multi-arch support).
- dnl The last entry in the list is chosen by default when no libraries
- dnl are found, e.g. when only header-only libraries are installed!
- AS_CASE([${host_cpu}],
- [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
- [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
- [libsubdirs="lib"],
- )
-
- dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
- dnl them priority over the other paths since, if libs are found there, they
- dnl are almost assuredly the ones desired.
- AS_CASE([${host_cpu}],
- [i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
- [multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
- )
-
- dnl first we check the system location for boost libraries
- dnl this location ist chosen if boost libraries are installed with the --layout=system option
- dnl or if you install boost with RPM
- AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
- AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
- AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
- AC_MSG_RESULT([yes])
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
- for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
- AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
- AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
- AC_MSG_RESULT([yes])
- BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
- break;
- ],
- [AC_MSG_RESULT([no])])
- done],[
- AC_MSG_RESULT([no])])
- ],[
- if test X"$cross_compiling" = Xyes; then
- search_libsubdirs=$multiarch_libsubdir
- else
- search_libsubdirs="$multiarch_libsubdir $libsubdirs"
- fi
- for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
- if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
- for libsubdir in $search_libsubdirs ; do
- if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
- break;
- fi
- done
- ])
-
- dnl overwrite ld flags if we have required special directory with
- dnl --with-boost-libdir parameter
- AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
- [BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
-
- AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_REQUIRE([AC_PROG_CXX])
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
- AC_MSG_RESULT(yes)
- succeeded=yes
- found_system=yes
- ],[
- ])
- AC_LANG_POP([C++])
-
-
-
- dnl if we found no boost with system layout we search for boost libraries
- dnl built and installed without the --layout=system option or for a staged(not installed) version
- if test "x$succeeded" != "xyes" ; then
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- BOOST_CPPFLAGS=
- if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
- BOOST_LDFLAGS=
- fi
- _version=0
- if test -n "$_AX_BOOST_BASE_boost_path" ; then
- if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
- for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
- _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
- V_CHECK=`expr $_version_tmp \> $_version`
- if test "x$V_CHECK" = "x1" ; then
- _version=$_version_tmp
- fi
- VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
- done
- dnl if nothing found search for layout used in Windows distributions
- if test -z "$BOOST_CPPFLAGS"; then
- if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
- fi
- fi
- dnl if we found something and BOOST_LDFLAGS was unset before
- dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
- if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
- for libsubdir in $libsubdirs ; do
- if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
- fi
- fi
- else
- if test "x$cross_compiling" != "xyes" ; then
- for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
- if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
- for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
- _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
- V_CHECK=`expr $_version_tmp \> $_version`
- if test "x$V_CHECK" = "x1" ; then
- _version=$_version_tmp
- best_path=$_AX_BOOST_BASE_boost_path
- fi
- done
- fi
- done
-
- VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
- BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
- if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
- for libsubdir in $libsubdirs ; do
- if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- BOOST_LDFLAGS="-L$best_path/$libsubdir"
- fi
- fi
-
- if test -n "$BOOST_ROOT" ; then
- for libsubdir in $libsubdirs ; do
- if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
- version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
- stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
- stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
- V_CHECK=`expr $stage_version_shorten \>\= $_version`
- if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
- AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
- BOOST_CPPFLAGS="-I$BOOST_ROOT"
- BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
- fi
- fi
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
- AC_MSG_RESULT(yes)
- succeeded=yes
- found_system=yes
- ],[
- ])
- AC_LANG_POP([C++])
- fi
-
- if test "x$succeeded" != "xyes" ; then
- if test "x$_version" = "x0" ; then
- AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]])
- else
- AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
- fi
- # execute ACTION-IF-NOT-FOUND (if present):
- ifelse([$3], , :, [$3])
- else
- AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
- # execute ACTION-IF-FOUND (if present):
- ifelse([$2], , :, [$2])
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
-
-])
\ No newline at end of file
diff --git a/m4macros/ax_boost_chrono.m4 b/m4macros/ax_boost_chrono.m4
deleted file mode 100644
index 6ea77b9b3..000000000
--- a/m4macros/ax_boost_chrono.m4
+++ /dev/null
@@ -1,118 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_CHRONO
-#
-# DESCRIPTION
-#
-# Test for Chrono library from the Boost C++ libraries. The macro requires
-# a preceding call to AX_BOOST_BASE. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_CHRONO_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_CHRONO
-#
-# LICENSE
-#
-# Copyright (c) 2012 Xiyue Deng
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 4
-
-AC_DEFUN([AX_BOOST_CHRONO],
-[
- AC_ARG_WITH([boost-chrono],
- AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@],
- [use the Chrono library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-chrono=boost_chrono-gcc-mt ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_chrono_lib=""
- else
- want_boost="yes"
- ax_boost_user_chrono_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_BUILD])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_CACHE_CHECK(whether the Boost::Chrono library is available,
- ax_cv_boost_chrono,
- [AC_LANG_PUSH([C++])
- CXXFLAGS_SAVE=$CXXFLAGS
-
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
- [[boost::chrono::system_clock::time_point* time = new boost::chrono::system_clock::time_point; delete time;]])],
- ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
- CXXFLAGS=$CXXFLAGS_SAVE
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_chrono" = "xyes"; then
- AC_SUBST(BOOST_CPPFLAGS)
-
- AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-
- LDFLAGS_SAVE=$LDFLAGS
- if test "x$ax_boost_user_chrono_lib" = "x"; then
- for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
- [link_chrono="no"])
- done
- if test "x$link_chrono" != "xyes"; then
- for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
- [link_chrono="no"])
- done
- fi
-
- else
- for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
- [link_chrono="no"])
- done
-
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the library!)
- fi
- if test "x$link_chrono" = "xno"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/m4macros/ax_boost_filesystem.m4 b/m4macros/ax_boost_filesystem.m4
deleted file mode 100644
index c392f9d65..000000000
--- a/m4macros/ax_boost_filesystem.m4
+++ /dev/null
@@ -1,118 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_FILESYSTEM
-#
-# DESCRIPTION
-#
-# Test for Filesystem library from the Boost C++ libraries. The macro
-# requires a preceding call to AX_BOOST_BASE. Further documentation is
-# available at .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_FILESYSTEM_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_FILESYSTEM
-#
-# LICENSE
-#
-# Copyright (c) 2009 Thomas Porschberg
-# Copyright (c) 2009 Michael Tindal
-# Copyright (c) 2009 Roman Rybalko
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 27
-
-AC_DEFUN([AX_BOOST_FILESYSTEM],
-[
- AC_ARG_WITH([boost-filesystem],
- AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
- [use the Filesystem library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_filesystem_lib=""
- else
- want_boost="yes"
- ax_boost_user_filesystem_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- LIBS_SAVED=$LIBS
- LIBS="$LIBS $BOOST_SYSTEM_LIB"
- export LIBS
-
- AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
- ax_cv_boost_filesystem,
- [AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
- [[using namespace boost::filesystem;
- path my_path( "foo/bar/data.txt" );
- return 0;]])],
- ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_filesystem" = "xyes"; then
- AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
- if test "x$ax_boost_user_filesystem_lib" = "x"; then
- for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
- [link_filesystem="no"])
- done
- if test "x$link_filesystem" != "xyes"; then
- for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
- [link_filesystem="no"])
- done
- fi
- else
- for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
- [link_filesystem="no"])
- done
-
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the library!)
- fi
- if test "x$link_filesystem" != "xyes"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- LIBS="$LIBS_SAVED"
- fi
-])
diff --git a/m4macros/ax_boost_locale.m4 b/m4macros/ax_boost_locale.m4
deleted file mode 100644
index adaedf09e..000000000
--- a/m4macros/ax_boost_locale.m4
+++ /dev/null
@@ -1,119 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_locale.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_LOCALE
-#
-# DESCRIPTION
-#
-# Test for System library from the Boost C++ libraries. The macro requires
-# a preceding call to AX_BOOST_BASE. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_LOCALE_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_LOCALE
-#
-# LICENSE
-#
-# Copyright (c) 2012 Xiyue Deng
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 2
-
-AC_DEFUN([AX_BOOST_LOCALE],
-[
- AC_ARG_WITH([boost-locale],
- AS_HELP_STRING([--with-boost-locale@<:@=special-lib@:>@],
- [use the Locale library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-locale=boost_locale-gcc-mt ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_locale_lib=""
- else
- want_boost="yes"
- ax_boost_user_locale_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_BUILD])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_CACHE_CHECK(whether the Boost::Locale library is available,
- ax_cv_boost_locale,
- [AC_LANG_PUSH([C++])
- CXXFLAGS_SAVE=$CXXFLAGS
-
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
- [[boost::locale::generator gen;
- std::locale::global(gen(""));]])],
- ax_cv_boost_locale=yes, ax_cv_boost_locale=no)
- CXXFLAGS=$CXXFLAGS_SAVE
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_locale" = "xyes"; then
- AC_SUBST(BOOST_CPPFLAGS)
-
- AC_DEFINE(HAVE_BOOST_LOCALE,,[define if the Boost::Locale library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-
- LDFLAGS_SAVE=$LDFLAGS
- if test "x$ax_boost_user_locale_lib" = "x"; then
- for libextension in `ls $BOOSTLIBDIR/libboost_locale*.so* $BOOSTLIBDIR/libboost_locale*.dylib* $BOOSTLIBDIR/libboost_locale*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_locale.*\)\.so.*$;\1;' -e 's;^lib\(boost_locale.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_locale.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_LOCALE_LIB="-l$ax_lib"; AC_SUBST(BOOST_LOCALE_LIB) link_locale="yes"; break],
- [link_locale="no"])
- done
- if test "x$link_locale" != "xyes"; then
- for libextension in `ls $BOOSTLIBDIR/boost_locale*.dll* $BOOSTLIBDIR/boost_locale*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_locale.*\)\.dll.*$;\1;' -e 's;^\(boost_locale.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_LOCALE_LIB="-l$ax_lib"; AC_SUBST(BOOST_LOCALE_LIB) link_locale="yes"; break],
- [link_locale="no"])
- done
- fi
-
- else
- for ax_lib in $ax_boost_user_locale_lib boost_locale-$ax_boost_user_locale_lib; do
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_LOCALE_LIB="-l$ax_lib"; AC_SUBST(BOOST_LOCALE_LIB) link_locale="yes"; break],
- [link_locale="no"])
- done
-
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the library!)
- fi
- if test "x$link_locale" = "xno"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/m4macros/ax_boost_regex.m4 b/m4macros/ax_boost_regex.m4
deleted file mode 100644
index e2413c24f..000000000
--- a/m4macros/ax_boost_regex.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_regex.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_REGEX
-#
-# DESCRIPTION
-#
-# Test for Regex library from the Boost C++ libraries. The macro requires
-# a preceding call to AX_BOOST_BASE. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_REGEX_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_REGEX
-#
-# LICENSE
-#
-# Copyright (c) 2008 Thomas Porschberg
-# Copyright (c) 2008 Michael Tindal
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 23
-
-AC_DEFUN([AX_BOOST_REGEX],
-[
- AC_ARG_WITH([boost-regex],
- AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@],
- [use the Regex library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_regex_lib=""
- else
- want_boost="yes"
- ax_boost_user_regex_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_CACHE_CHECK(whether the Boost::Regex library is available,
- ax_cv_boost_regex,
- [AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include
- ]],
- [[boost::regex r(); return 0;]])],
- ax_cv_boost_regex=yes, ax_cv_boost_regex=no)
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_regex" = "xyes"; then
- AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
- if test "x$ax_boost_user_regex_lib" = "x"; then
- for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
- [link_regex="no"])
- done
- if test "x$link_regex" != "xyes"; then
- for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
- [link_regex="no"])
- done
- fi
-
- else
- for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
- AC_CHECK_LIB($ax_lib, main,
- [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
- [link_regex="no"])
- done
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the Boost::Regex library!)
- fi
- if test "x$link_regex" != "xyes"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/m4macros/ax_boost_system.m4 b/m4macros/ax_boost_system.m4
deleted file mode 100644
index 207d7be8d..000000000
--- a/m4macros/ax_boost_system.m4
+++ /dev/null
@@ -1,121 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_SYSTEM
-#
-# DESCRIPTION
-#
-# Test for System library from the Boost C++ libraries. The macro requires
-# a preceding call to AX_BOOST_BASE. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_SYSTEM_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_SYSTEM
-#
-# LICENSE
-#
-# Copyright (c) 2008 Thomas Porschberg
-# Copyright (c) 2008 Michael Tindal
-# Copyright (c) 2008 Daniel Casimiro
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 19
-
-AC_DEFUN([AX_BOOST_SYSTEM],
-[
- AC_ARG_WITH([boost-system],
- AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
- [use the System library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-system=boost_system-gcc-mt ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_system_lib=""
- else
- want_boost="yes"
- ax_boost_user_system_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_BUILD])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_CACHE_CHECK(whether the Boost::System library is available,
- ax_cv_boost_system,
- [AC_LANG_PUSH([C++])
- CXXFLAGS_SAVE=$CXXFLAGS
- CXXFLAGS=
-
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
- [[boost::system::error_category *a = 0;]])],
- ax_cv_boost_system=yes, ax_cv_boost_system=no)
- CXXFLAGS=$CXXFLAGS_SAVE
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_system" = "xyes"; then
- AC_SUBST(BOOST_CPPFLAGS)
-
- AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-
- LDFLAGS_SAVE=$LDFLAGS
- if test "x$ax_boost_user_system_lib" = "x"; then
- for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
- [link_system="no"])
- done
- if test "x$link_system" != "xyes"; then
- for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
- [link_system="no"])
- done
- fi
-
- else
- for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
- [link_system="no"])
- done
-
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the library!)
- fi
- if test "x$link_system" = "xno"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/m4macros/ax_boost_thread.m4 b/m4macros/ax_boost_thread.m4
deleted file mode 100644
index eee9ab61e..000000000
--- a/m4macros/ax_boost_thread.m4
+++ /dev/null
@@ -1,163 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_THREAD
-#
-# DESCRIPTION
-#
-# Test for Thread library from the Boost C++ libraries. The macro requires
-# a preceding call to AX_BOOST_BASE. Further documentation is available at
-# .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_THREAD_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_THREAD
-#
-# LICENSE
-#
-# Copyright (c) 2009 Thomas Porschberg
-# Copyright (c) 2009 Michael Tindal
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 31
-
-AC_DEFUN([AX_BOOST_THREAD],
-[
- AC_ARG_WITH([boost-thread],
- AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
- [use the Thread library from boost -
- it is possible to specify a certain library for the linker
- e.g. --with-boost-thread=boost_thread-gcc-mt ]),
- [
- if test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_thread_lib=""
- else
- want_boost="yes"
- ax_boost_user_thread_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_BUILD])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
-
- AC_CACHE_CHECK(whether the Boost::Thread library is available,
- ax_cv_boost_thread,
- [AC_LANG_PUSH([C++])
- CXXFLAGS_SAVE=$CXXFLAGS
-
- if test "x$host_os" = "xsolaris" ; then
- CXXFLAGS="-pthreads $CXXFLAGS"
- elif test "x$host_os" = "xmingw32" ; then
- CXXFLAGS="-mthreads $CXXFLAGS"
- else
- CXXFLAGS="-pthread $CXXFLAGS"
- fi
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [[@%:@include ]],
- [[boost::thread_group thrds;
- return 0;]])],
- ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
- CXXFLAGS=$CXXFLAGS_SAVE
- AC_LANG_POP([C++])
- ])
- if test "x$ax_cv_boost_thread" = "xyes"; then
- if test "x$host_os" = "xsolaris" ; then
- BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
- elif test "x$host_os" = "xmingw32" ; then
- BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
- else
- BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
- fi
-
- AC_SUBST(BOOST_CPPFLAGS)
-
- AC_DEFINE(HAVE_BOOST_THREAD,,
- [define if the Boost::Thread library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-
- LDFLAGS_SAVE=$LDFLAGS
- case "x$host_os" in
- *bsd* )
- LDFLAGS="-pthread $LDFLAGS"
- break;
- ;;
- esac
- if test "x$ax_boost_user_thread_lib" = "x"; then
- for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [link_thread="yes"; break],
- [link_thread="no"])
- done
- if test "x$link_thread" != "xyes"; then
- for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [link_thread="yes"; break],
- [link_thread="no"])
- done
- fi
-
- else
- for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
- AC_CHECK_LIB($ax_lib, exit,
- [link_thread="yes"; break],
- [link_thread="no"])
- done
-
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the library!)
- fi
- if test "x$link_thread" = "xno"; then
- AC_MSG_ERROR(Could not link against $ax_lib !)
- else
- BOOST_THREAD_LIB="-l$ax_lib"
- case "x$host_os" in
- *bsd* )
- BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
- break;
- ;;
- xsolaris )
- BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
- break;
- ;;
- xmingw32 )
- break;
- ;;
- * )
- BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
- break;
- ;;
- esac
- AC_SUBST(BOOST_THREAD_LIB)
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/m4macros/ax_check_gl.m4 b/m4macros/ax_check_gl.m4
deleted file mode 100644
index 39423bf7f..000000000
--- a/m4macros/ax_check_gl.m4
+++ /dev/null
@@ -1,559 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_gl.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_GL
-#
-# DESCRIPTION
-#
-# Check for an OpenGL implementation. If GL is found, the required
-# compiler and linker flags are included in the output variables
-# "GL_CFLAGS", "GL_LIBS", "GL_LDFLAGS", respectively. If no usable GL
-# implementation is found, "no_gl" is set to "yes".
-#
-# You could disable OpenGL using --with-gl=no
-#
-# You could choose a specific OpenGL libs using --with-gl=lib_name
-#
-# Under darwin, cygwin and mingw target you could prefer the OpenGL
-# implementation that link with X setting --with-gl=x or without X support
-# with --with-gl=nox. Notes that this script try to guess the right
-# implementation.
-#
-# If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the
-# header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These
-# preprocessor definitions may not be mutually exclusive.
-#
-# You should use something like this in your headers:
-#
-# #if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# # include
-# #endif
-# #ifdef HAVE_GL_GL_H
-# # include
-# #elif defined(HAVE_OPENGL_GL_H)
-# # include
-# #else
-# # error no gl.h
-# #endif
-#
-# LICENSE
-#
-# Copyright (c) 2009 Braden McDaniel
-# Copyright (c) 2012 Bastien Roucaries
-#
-# 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 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 .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 17
-
-m4_define([_AX_CHECK_GL_PROGRAM],
- [AC_LANG_PROGRAM([[
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include
-# endif
-# ifdef HAVE_GL_GL_H
-# include
-# elif defined(HAVE_OPENGL_GL_H)
-# include
-# else
-# error no gl.h
-# endif
-]],[[glBegin(0)]])])
-
-dnl Default include : add windows.h
-dnl see http://www.opengl.org/wiki/Platform_specifics:_Windows
-dnl (acceded 20120801)
-AC_DEFUN([_AX_CHECK_GL_INCLUDES_DEFAULT],dnl
-[
- AC_INCLUDES_DEFAULT
- [
- # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
- # include
- # endif
- ]
-])
-
-dnl local save flags
-AC_DEFUN([_AX_CHECK_GL_SAVE_FLAGS],
-[dnl
-ax_check_gl_saved_libs="${LIBS}"
-ax_check_gl_saved_cflags="${CFLAGS}"
-ax_check_gl_saved_cppflags="${CPPFLAGS}"
-ax_check_gl_saved_ldflags="${LDFLAGS}"
-])
-
-dnl local restore flags
-AC_DEFUN([_AX_CHECK_GL_RESTORE_FLAGS],
-[dnl
-LIBS="${ax_check_gl_saved_libs}"
-CFLAGS="${ax_check_gl_saved_cflags}"
-CPPFLAGS="${ax_check_gl_saved_cppflags}"
-LDFLAGS="${ax_check_gl_saved_ldflags}"
-])
-
-dnl default switch case failure
-AC_DEFUN([_AX_CHECK_MSG_FAILURE_ORDER],
-[dnl
- AC_MSG_FAILURE([Order logic in ax_check_gl is buggy])
-])
-
-# set the varible ax_check_gl_need_x
-# this variable determine if we need opengl that link with X
-# value are default aka try the first library wether if it link or not with x
-# yes that means we need a opengl with x
-# no that means we do not need an opengl with x
-AC_DEFUN([_AX_CHECK_GL_NEED_X],
-[dnl
- # do not check if empty : allow a subroutine to modify the choice
- AS_IF([test "X$ax_check_gl_need_x" = "X"],
- [ax_check_gl_need_x="default"
- AS_IF([test "X$no_x" = "Xyes"],[ax_check_gl_need_x="no"])
- AS_IF([test "X$ax_check_gl_want_gl" = "Xnox"],[ax_check_gl_need_x="no"])
- AS_IF([test "X$ax_check_gl_want_gl" = "Xx"],[ax_check_gl_need_x="yes"])])
-])
-
-# compile the example program
-AC_DEFUN([_AX_CHECK_GL_COMPILE],
-[dnl
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- AC_COMPILE_IFELSE([_AX_CHECK_GL_PROGRAM],
- [ax_check_gl_compile_opengl="yes"],
- [ax_check_gl_compile_opengl="no"])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
-])
-
-# compile the example program (cache)
-AC_DEFUN([_AX_CHECK_GL_COMPILE_CV],
-[dnl
- AC_CACHE_CHECK([for compiling a minimal OpenGL program],[ax_cv_check_gl_compile_opengl],
- [_AX_CHECK_GL_COMPILE()
- ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}"])
- ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}"
-])
-
-# link the example program
-AC_DEFUN([_AX_CHECK_GL_LINK],
-[dnl
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- LIBS="${GL_LIBS} ${LIBS}"
- LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}"
- AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM],
- [ax_check_gl_link_opengl="yes"],
- [ax_check_gl_link_opengl="no"])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
-])
-
-# link the example program (cache)
-AC_DEFUN([_AX_CHECK_GL_LINK_CV],
-[dnl
- AC_CACHE_CHECK([for linking a minimal OpenGL program],[ax_cv_check_gl_link_opengl],
- [_AX_CHECK_GL_LINK()
- ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}"])
- ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}"
-])
-
-dnl Check headers manually (default case)
-AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT],
-[AC_REQUIRE([AC_PATH_XTRA])
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT
- AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT])
- # FIXME: use extra cflags
- AC_CHECK_HEADERS([GL/gl.h],[ax_check_gl_have_headers="yes"],
- [ax_check_gl_have_headers_headers="no"],
- [_AX_CHECK_GL_INCLUDES_DEFAULT()])
- # do not try darwin specific OpenGl/gl.h
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
-])
-
-# darwin headers without X
-AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX],[
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- # FIXME: use -framework opengl as an extra cflags
- CFLAGS="-framework opengl ${GL_CFLAGS} ${CFLAGS}"
- AC_CHECK_HEADERS([OpenGL/gl.h],[ax_check_gl_have_headers="yes"],
- [ax_check_gl_have_headers_headers="no"],
- [_AX_CHECK_GL_INCLUDES_DEFAULT()])
- AS_IF([test "X$ax_check_gl_have_headers" = "yes"],
- [GL_CFLAGS="-framework opengl ${GL_CFLAGS}"])
- _AX_CHECK_GL_SAVE_FLAGS()
- AC_LANG_POP([C])
-])
-
-# check header for darwin
-AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN],
-[AC_REQUIRE([_AX_CHECK_GL_NEED_X])dnl
- AS_CASE(["$ax_check_gl_order"],
- # try to use framework
- ["gl"],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()],
- # try to use framework then mesa (X)
- ["gl mesagl"],[
- _AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()
- AS_IF([test "X$ax_check_gl_have_headers" = "yes"],
- [ax_check_gl_order="gl"
- ax_check_gl_need_x="yes"],
- [ax_check_gl_order="mesagl gl"
- ax_check_gl_need_x="no"]
- # retry with general test
- _AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()])],
- ["mesagl gl"],[
- _AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()
- AS_IF([test "X$ax_check_gl_have_headers" = "yes"],
- [ax_check_gl_order="mesagl gl"
- ax_check_gl_need_x="no"],
- [ax_check_gl_order="gl"
- ax_check_gl_need_x="yes"
- # retry with framework
- _AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()])],
- [_AX_CHECK_MSG_FAILURE_ORDER()])
-])
-
-dnl Check headers manually: subroutine must set ax_check_gl_have_headers={yes,no}
-AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS],
-[AC_REQUIRE([AC_CANONICAL_HOST])
- AS_CASE([${host}],
- [*-darwin*],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN],
- [_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()])
- AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers],
- [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"])
-])
-
-# dnl try to found library (generic case)
-# dnl $1 is set to the library to found
-AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_GENERIC],
-[dnl
- ax_check_gl_manual_libs_generic_extra_libs="$1"
- AS_IF([test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"],
- [AC_MSG_ERROR([AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty])])
-
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- LIBS="${GL_LIBS} ${LIBS}"
- AC_SEARCH_LIBS([glBegin],[$ax_check_gl_manual_libs_generic_extra_libs],
- [ax_check_gl_lib_opengl="yes"],
- [ax_check_gl_lib_opengl="no"])
- AS_CASE([$ac_cv_search_glBegin],
- ["none required"],[],
- [no],[],
- [GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}"])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_PUSH([C])
-])
-
-# dnl try to found lib under darwin
-# darwin opengl hack
-# see http://web.archive.org/web/20090410052741/http://developer.apple.com/qa/qa2007/qa1567.html
-# and http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/
-AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_DARWIN],
-[# ldhack list
- ldhack1 = "-Wl,-framework,OpenGL"
- ldhack2 = "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
- ldhack3 = "$ldhack1,$ldhack2"
-
- # select hack
- AS_IF([test "X$ax_check_gl_need_x" = "Xyes"],
- [# libs already set by -framework cflag
- darwinlibs=""
- ldhacks="$ldhack1 $ldhack2 $ldhack3"],
- [# do not use framework ldflags in case of x version
- darwinlibs="GL gl MesaGL"
- ldhack="$ldhack2"])
-
- ax_check_gl_link_opengl="no"
- for extralibs in " " $darwinlibs; do
- for extraldflags in " " ldhacks; do
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- LIBS="$extralibs ${GL_LIBS} ${LIBS}"
- LDFLAGS="$extraldflags ${GL_LDFLAGS} ${LDFLAGS}"
- AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM],
- [ax_check_gl_link_opengl="yes"],
- [ax_check_gl_link_opengl="no"])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
- AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break])
- done;
- AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break])
- done;
- GL_LIBS="$extralibs ${GL_LIBS}"
- GL_LDFLAGS="$extraldflags ${GL_LDFLAGS}"
-])
-
-dnl Check library manually: subroutine must set
-dnl $ax_check_gl_lib_opengl={yes,no}
-AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS],
-[AC_REQUIRE([AC_CANONICAL_HOST])
- AS_CASE([${host}],
- [*-darwin*],[_AX_CHECK_GL_MANUAL_LIBS_DARWIN()],
- # try first cygwin version
- [*-cygwin*|*-mingw*],[
- AS_CASE(["$ax_check_gl_order"],
- ["gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32])],
- ["gl mesagl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32 GL gl MesaGL])],
- ["mesagl gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL opengl32])],
- [_AX_CHECK_MSG_FAILURE_ORDER()])],
- [AS_CASE(["$ax_check_gl_order"],
- ["gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl])],
- ["gl mesagl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL])],
- ["mesagl gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([MesaGL GL gl])],
- [_AX_CHECK_MSG_FAILURE_ORDER()])]
- )
-
- AC_CACHE_CHECK([for OpenGL libraries],[ax_cv_check_gl_lib_opengl],
- [ax_cv_check_gl_lib_opengl="${ax_check_gl_lib_opengl}"])
- ax_check_gl_lib_opengl="${ax_cv_check_gl_lib_opengl}"
-])
-
-# manually check aka old way
-AC_DEFUN([_AX_CHECK_GL_MANUAL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
- AC_REQUIRE([AC_PATH_XTRA])dnl
-
- no_gl="yes"
-
- _AX_CHECK_GL_MANUAL_HEADERS()
- AS_IF([test "X$ax_check_gl_have_headers" = "Xyes"],
- [_AX_CHECK_GL_COMPILE_CV()],
- [ax_check_gl_compile_opengl=no])
-
- AS_IF([test "X$ax_check_gl_compile_opengl" = "Xyes"],
- [_AX_CHECK_GL_MANUAL_LIBS],
- [ax_check_gl_lib_opengl=no])
-
- AS_IF([test "X$ax_check_gl_lib_opengl" = "Xyes"],
- [_AX_CHECK_GL_LINK_CV()],
- [ax_check_gl_link_opengl=no])
-
- AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],
- [no_gl="no"],
- [no_gl="yes"])
-])dnl
-
-
-# try to test using pkgconfig: set ax_check_gl_pkg_config=no if not found
-AC_DEFUN([_AX_CHECK_GL_PKG_CONFIG],dnl
-[dnl
- AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-
- dnl First try mesagl
- AS_CASE(["$ax_check_gl_order"],
- ["gl"],[PKG_CHECK_MODULES([GL],[mesagl],
- [ax_check_gl_pkg_config=yes],
- [ax_check_gl_pkg_config=no])],
- ["gl mesagl"],[PKG_CHECK_MODULES([GL],[gl],
- [ax_check_gl_pkg_config=yes],
- [PKG_CHECK_MODULES([GL],[mesagl],
- [ax_check_gl_pkg_config=yes],
- [ax_check_gl_pkg_config=no])])],
- ["mesagl gl"],[PKG_CHECK_MODULES([GL],[mesagl],
- [ax_check_gl_pkg_config=yes],
- [PKG_CHECK_MODULES([GL],[gl],
- [ax_check_gl_pkg_config=yes],
- [ax_check_gl_pkg_config=no])])],
- [_AX_CHECK_MSG_FAILURE_ORDER])
-
- AS_IF([test "X$ax_check_gl_pkg_config" = "Xyes"],[
- # check headers
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT])
- AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h],
- [ax_check_gl_have_headers="yes";break],
- [ax_check_gl_have_headers_headers="no"],
- [_AX_CHECK_GL_INCLUDES_DEFAULT()])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
- AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers],
- [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"])
-
- # pkgconfig library are suposed to work ...
- AS_IF([test "X$ax_cv_check_gl_have_headers" = "Xno"],
- [AC_MSG_ERROR("Pkgconfig detected OpenGL library has no headers!")])
-
- _AX_CHECK_GL_COMPILE_CV()
- AS_IF([test "X$ax_cv_check_gl_compile_opengl" = "Xno"],
- [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for compiling minimal program!")])
-
- _AX_CHECK_GL_LINK_CV()
- AS_IF([test "X$ax_cv_check_gl_link_opengl" = "Xno"],
- [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for linking minimal program!")])
- ],[ax_check_gl_pkg_config=no])
-])
-
-# test if gl link with X
-AC_DEFUN([_AX_CHECK_GL_WITH_X],
-[
- # try if opengl need X
- AC_LANG_PUSH([C])
- _AX_CHECK_GL_SAVE_FLAGS()
- CFLAGS="${GL_CFLAGS} ${CFLAGS}"
- LIBS="${GL_LIBS} ${LIBS}"
- LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}"
- AC_LINK_IFELSE([AC_LANG_CALL([], [glXQueryVersion])],
- [ax_check_gl_link_implicitly_with_x="yes"],
- [ax_check_gl_link_implicitly_with_x="no"])
- _AX_CHECK_GL_RESTORE_FLAGS()
- AC_LANG_POP([C])
-])
-
-# internal routine: entry point if gl not disable
-AC_DEFUN([_AX_CHECK_GL],[dnl
- AC_REQUIRE([PKG_PROG_PKG_CONFIG])
- AC_REQUIRE([AC_PATH_X])dnl
-
- # does we need X or not
- _AX_CHECK_GL_NEED_X()
-
- # try first pkgconfig
- AC_MSG_CHECKING([for a working OpenGL implementation by pkg-config])
- AS_IF([test "X${PKG_CONFIG}" = "X"],
- [ AC_MSG_RESULT([no])
- ax_check_gl_pkg_config=no],
- [ AC_MSG_RESULT([yes])
- _AX_CHECK_GL_PKG_CONFIG()])
-
- # if no pkgconfig or pkgconfig fail try manual way
- AS_IF([test "X$ax_check_gl_pkg_config" = "Xno"],
- [_AX_CHECK_GL_MANUAL()],
- [no_gl=no])
-
- # test if need to test X compatibility
- AS_IF([test $no_gl = no],
- [# test X compatibility
- AS_IF([test X$ax_check_gl_need_x != "Xdefault"],
- [AC_CACHE_CHECK([wether OpenGL link implictly with X],[ax_cv_check_gl_link_with_x],
- [_AX_CHECK_GL_WITH_X()
- ax_cv_check_gl_link_with_x="${ax_check_gl_link_implicitly_with_x}"])
- AS_IF([test "X${ax_cv_check_gl_link_with_x}" = "X${ax_check_gl_need_x}"],
- [no_gl="no"],
- [no_gl=yes])])
- ])
-])
-
-# ax_check_gl entry point
-AC_DEFUN([AX_CHECK_GL],
-[AC_REQUIRE([AC_PATH_X])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- AC_ARG_WITH([gl],
- [AS_HELP_STRING([--with-gl@<:@=ARG@:>@],
- [use opengl (ARG=yes),
- using the specific lib (ARG=),
- using the OpenGL lib that link with X (ARG=x),
- using the OpenGL lib that link without X (ARG=nox),
- or disable it (ARG=no)
- @<:@ARG=yes@:>@ ])],
- [
- AS_CASE(["$withval"],
- ["no"|"NO"],[ax_check_gl_want_gl="no"],
- ["yes"|"YES"],[ax_check_gl_want_gl="yes"],
- [ax_check_gl_want_gl="$withval"])
- ],
- [ax_check_gl_want_gl="yes"])
-
- dnl compatibility with AX_HAVE_OPENGL
- AC_ARG_WITH([Mesa],
- [AS_HELP_STRING([--with-Mesa@<:@=ARG@:>@],
- [Prefer the Mesa library over a vendors native OpenGL (ARG=yes except on mingw ARG=no),
- @<:@ARG=yes@:>@ ])],
- [
- AS_CASE(["$withval"],
- ["no"|"NO"],[ax_check_gl_want_mesa="no"],
- ["yes"|"YES"],[ax_check_gl_want_mesa="yes"],
- [AC_MSG_ERROR([--with-mesa flag is only yes no])])
- ],
- [ax_check_gl_want_mesa="default"])
-
- # check consistency of parameters
- AS_IF([test "X$have_x" = "Xdisabled"],
- [AS_IF([test X$ax_check_gl_want_gl = "Xx"],
- [AC_MSG_ERROR([You prefer OpenGL with X and asked for no X support])])])
-
- AS_IF([test "X$have_x" = "Xdisabled"],
- [AS_IF([test X$x_check_gl_want_mesa = "Xyes"],
- [AC_MSG_WARN([You prefer mesa but you disable X. Disable mesa because mesa need X])
- ax_check_gl_want_mesa="no"])])
-
- # mesa default means yes except on mingw
- AC_MSG_CHECKING([wether we should prefer mesa for opengl implementation])
- AS_IF([test X$ax_check_gl_want_mesa = "Xdefault"],
- [AS_CASE([${host}],
- [*-mingw*],[ax_check_gl_want_mesa=no],
- [ax_check_gl_want_mesa=yes])])
- AC_MSG_RESULT($ax_check_gl_want_mesa)
-
- # set default guess order
- AC_MSG_CHECKING([for a working OpenGL order detection])
- AS_IF([test "X$no_x" = "Xyes"],
- [ax_check_gl_order="gl"],
- [AS_IF([test X$ax_check_gl_want_mesa = "Xyes"],
- [ax_check_gl_order="mesagl gl"],
- [ax_check_gl_order="gl mesagl"])])
- AC_MSG_RESULT($ax_check_gl_order)
-
- # set flags
- no_gl="yes"
- have_GL="no"
-
- # now do the real testing
- AS_IF([test X$ax_check_gl_want_gl != "Xno"],
- [_AX_CHECK_GL()])
-
- AC_MSG_CHECKING([for a working OpenGL implementation])
- AS_IF([test "X$no_gl" = "Xno"],
- [have_GL="yes"
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([for CFLAGS needed for OpenGL])
- AC_MSG_RESULT(["${GL_CFLAGS}"])
- AC_MSG_CHECKING([for LIBS needed for OpenGL])
- AC_MSG_RESULT(["${GL_LIBS}"])
- AC_MSG_CHECKING([for LDFLAGS needed for OpenGL])
- AC_MSG_RESULT(["${GL_LDFLAGS}"])],
- [AC_MSG_RESULT([no])
- GL_CFLAGS=""
- GL_LIBS=""
- GL_LDFLAGS=""])
-
- AC_SUBST([GL_CFLAGS])
- AC_SUBST([GL_LIBS])
- AC_SUBST([GL_LDFLAGS])
-])
diff --git a/m4macros/ax_lang_compiler_ms.m4 b/m4macros/ax_lang_compiler_ms.m4
deleted file mode 100644
index 71b3d20ec..000000000
--- a/m4macros/ax_lang_compiler_ms.m4
+++ /dev/null
@@ -1,36 +0,0 @@
-##### http://autoconf-archive.cryp.to/ax_lang_compiler_ms.html
-#
-# SYNOPSIS
-#
-# AX_LANG_COMPILER_MS
-#
-# DESCRIPTION
-#
-# Check whether the compiler for the current language is Microsoft.
-#
-# This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU
-# Autoconf implementation.
-#
-# LAST MODIFICATION
-#
-# 2004-11-15
-#
-# COPYLEFT
-#
-# Copyright (c) 2004 Braden McDaniel
-#
-# Copying and distribution of this file, with or without
-# modification, are permitted in any medium without royalty provided
-# the copyright notice and this notice are preserved.
-
-AC_DEFUN([AX_LANG_COMPILER_MS],
-[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler],
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER
- choke me
-#endif
-]])],
- [ax_compiler_ms=yes],
- [ax_compiler_ms=no])
-ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
-])])
diff --git a/m4macros/ax_pthread.m4 b/m4macros/ax_pthread.m4
deleted file mode 100644
index d383ad5c6..000000000
--- a/m4macros/ax_pthread.m4
+++ /dev/null
@@ -1,332 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads. It
-# sets the PTHREAD_LIBS output variable to the threads library and linker
-# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-# flags that are needed. (The user can also force certain compiler
-# flags/libs to be tested by setting these environment variables.)
-#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well. e.g. you should link with
-# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-# If you are only building threads programs, you may wish to use these
-# variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-# PTHREAD_CFLAGS.
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads library
-# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-# is not found. If ACTION-IF-FOUND is not specified, the default action
-# will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or if
-# you have any other suggestions or comments. This macro was based on work
-# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-# Alejandro Forero Cuervo to the autoconf macro repository. We are also
-# grateful for the helpful feedback of numerous users.
-#
-# Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson
-# Copyright (c) 2011 Daniel Richard G.
-#
-# 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 .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 21
-
-AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-AC_DEFUN([AX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_PUSH([C])
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
- AC_MSG_RESULT([$ax_pthread_ok])
- if test x"$ax_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case ${host_os} in
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
- ;;
-
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
-esac
-
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
-
-AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
- [AC_MSG_RESULT([yes])],
- [ax_pthread_extra_flags=
- AC_MSG_RESULT([no])])
-CFLAGS="$save_CFLAGS"
-
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include
- static void routine(void *a) { a = 0; }
- static void *start_routine(void *a) { return a; }],
- [pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */])],
- [ax_pthread_ok=yes],
- [])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT([$ax_pthread_ok])
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],
- [int attr = $attr; return attr /* ; */])],
- [attr_name=$attr; break],
- [])
- done
- AC_MSG_RESULT([$attr_name])
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- # TODO: What about Clang on Solaris?
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- AC_MSG_RESULT([$flag])
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
- [ax_cv_PTHREAD_PRIO_INHERIT], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[int i = PTHREAD_PRIO_INHERIT;]])],
- [ax_cv_PTHREAD_PRIO_INHERIT=yes],
- [ax_cv_PTHREAD_PRIO_INHERIT=no])
- ])
- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
- [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != xyes; then
- case $host_os in
- aix*)
- AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
- [#handle absolute path differently from PATH based program lookup
- AS_CASE(["x$CC"],
- [x/*],
- [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
- [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
-AC_SUBST([PTHREAD_CC])
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
- ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
- :
-else
- ax_pthread_ok=no
- $2
-fi
-AC_LANG_POP
-])dnl AX_PTHREAD
diff --git a/m4macros/check_gnu_make.m4 b/m4macros/check_gnu_make.m4
deleted file mode 100644
index 44e1d9aa2..000000000
--- a/m4macros/check_gnu_make.m4
+++ /dev/null
@@ -1,78 +0,0 @@
-##### http://autoconf-archive.cryp.to/check_gnu_make.html
-#
-# SYNOPSIS
-#
-# CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found,
-# the makefile variable `ifGNUmake' is set to the empty string,
-# otherwise it is set to "#". This is useful for including a special
-# features in a Makefile, which cannot be handled by other versions
-# of make. The variable _cv_gnu_make_command is set to the command to
-# invoke GNU make if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could
-# do something like this (note that GNU make always looks for
-# GNUmakefile first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make
-# also exists, then the other make wraps the GNU make.
-#
-# LAST MODIFICATION
-#
-# 2002-01-04
-#
-# COPYLEFT
-#
-# Copyright (c) 2002 John Darrington
-#
-# Copying and distribution of this file, with or without
-# modification, are permitted in any medium without royalty provided
-# the copyright notice and this notice are preserved.
-
-AC_DEFUN(
- [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- else
- ifGNUmake='#' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
-] )
diff --git a/m4macros/wxwin.m4 b/m4macros/wxwin.m4
deleted file mode 100644
index 1c50dcc27..000000000
--- a/m4macros/wxwin.m4
+++ /dev/null
@@ -1,1060 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Author: wxWidgets development team,
-dnl Francesco Montorsi,
-dnl Bob McCown (Mac-testing)
-dnl Creation date: 24/11/2001
-dnl RCS-ID: $Id$
-dnl ---------------------------------------------------------------------------
-
-dnl ===========================================================================
-dnl Table of Contents of this macro file:
-dnl -------------------------------------
-dnl
-dnl SECTION A: wxWidgets main macros
-dnl - WX_CONFIG_OPTIONS
-dnl - WX_CONFIG_CHECK
-dnl - WXRC_CHECK
-dnl - WX_STANDARD_OPTIONS
-dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
-dnl - WX_DETECT_STANDARD_OPTION_VALUES
-dnl
-dnl SECTION B: wxWidgets-related utilities
-dnl - WX_LIKE_LIBNAME
-dnl - WX_ARG_ENABLE_YESNOAUTO
-dnl - WX_ARG_WITH_YESNOAUTO
-dnl
-dnl SECTION C: messages to the user
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END
-dnl - WX_BOOLOPT_SUMMARY
-dnl
-dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra
-dnl debug output on stdout from these macros.
-dnl ===========================================================================
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macros for wxWidgets detection. Typically used in configure.in as:
-dnl
-dnl AC_ARG_ENABLE(...)
-dnl AC_ARG_WITH(...)
-dnl ...
-dnl WX_CONFIG_OPTIONS
-dnl ...
-dnl ...
-dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1])
-dnl if test "$wxWin" != 1; then
-dnl AC_MSG_ERROR([
-dnl wxWidgets must be installed on your system
-dnl but wx-config script couldn't be found.
-dnl
-dnl Please check that wx-config is in path, the directory
-dnl where wxWidgets libraries are installed (returned by
-dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
-dnl equivalent variable and wxWidgets version is 2.3.4 or above.
-dnl ])
-dnl fi
-dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
-dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
-dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
-dnl
-dnl LIBS="$LIBS $WX_LIBS"
-dnl
-dnl If you want to support standard --enable-debug/unicode/shared options, you
-dnl may do the following:
-dnl
-dnl ...
-dnl AC_CANONICAL_SYSTEM
-dnl
-dnl # define configure options
-dnl WX_CONFIG_OPTIONS
-dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
-dnl
-dnl # basic configure checks
-dnl ...
-dnl
-dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE
-dnl WX_DEBUG=$DEBUG
-dnl WX_UNICODE=$UNICODE
-dnl
-dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
-dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS])
-dnl WX_DETECT_STANDARD_OPTION_VALUES
-dnl
-dnl # write the output files
-dnl AC_CONFIG_FILES([Makefile ...])
-dnl AC_OUTPUT
-dnl
-dnl # optional: just to show a message to the user
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
-dnl
-dnl ---------------------------------------------------------------------------
-
-
-dnl ---------------------------------------------------------------------------
-dnl WX_CONFIG_OPTIONS
-dnl
-dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and
-dnl --wx-config command line options
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([WX_CONFIG_OPTIONS],
-[
- AC_ARG_WITH(wxdir,
- [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH],
- [ wx_config_name="$withval/wx-config"
- wx_config_args="--inplace"])
- AC_ARG_WITH(wx-config,
- [ --with-wx-config=CONFIG wx-config script to use (optional)],
- wx_config_name="$withval" )
- AC_ARG_WITH(wx-prefix,
- [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)],
- wx_config_prefix="$withval", wx_config_prefix="")
- AC_ARG_WITH(wx-exec-prefix,
- [ --with-wx-exec-prefix=PREFIX
- Exec prefix where wxWidgets is installed (optional)],
- wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
-])
-
-dnl Helper macro for checking if wx version is at least $1.$2.$3, set's
-dnl wx_ver_ok=yes if it is:
-AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
-[
- wx_ver_ok=""
- if test "x$WX_VERSION" != x ; then
- if test $wx_config_major_version -gt $1; then
- wx_ver_ok=yes
- else
- if test $wx_config_major_version -eq $1; then
- if test $wx_config_minor_version -gt $2; then
- wx_ver_ok=yes
- else
- if test $wx_config_minor_version -eq $2; then
- if test $wx_config_micro_version -ge $3; then
- wx_ver_ok=yes
- fi
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
-dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]])
-dnl
-dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
-dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME
-dnl environment variable to override the default name of the wx-config script
-dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this
-dnl case the macro won't even waste time on tests for its existence.
-dnl
-dnl Optional WX-LIBS argument contains comma- or space-separated list of
-dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS
-dnl and WX_LIBS_STATIC will contain flags to link with all of the core
-dnl wxWidgets libraries.
-dnl
-dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
-dnl invocation command in present. It can be used to fine-tune lookup of
-dnl best wxWidgets build available.
-dnl
-dnl Example use:
-dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
-dnl [--unicode --debug])
-dnl ---------------------------------------------------------------------------
-
-dnl
-dnl Get the cflags and libraries from the wx-config script
-dnl
-AC_DEFUN([WX_CONFIG_CHECK],
-[
- dnl do we have wx-config name: it can be wx-config or wxd-config or ...
- if test x${WX_CONFIG_NAME+set} != xset ; then
- WX_CONFIG_NAME=wx-config
- fi
-
- if test "x$wx_config_name" != x ; then
- WX_CONFIG_NAME="$wx_config_name"
- fi
-
- dnl deal with optional prefixes
- if test x$wx_config_exec_prefix != x ; then
- wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
- WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
- fi
- if test x$wx_config_prefix != x ; then
- wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
- WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
- fi
- if test "$cross_compiling" = "yes"; then
- wx_config_args="$wx_config_args --host=$host_alias"
- fi
-
- dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
- if test -x "$WX_CONFIG_NAME" ; then
- AC_MSG_CHECKING(for wx-config)
- WX_CONFIG_PATH="$WX_CONFIG_NAME"
- AC_MSG_RESULT($WX_CONFIG_PATH)
- else
- AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
- fi
-
- if test "$WX_CONFIG_PATH" != "no" ; then
- WX_VERSION=""
-
- min_wx_version=ifelse([$1], ,2.2.1,$1)
- if test -z "$5" ; then
- AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version])
- else
- AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
- fi
-
- dnl don't add the libraries ($4) to this variable as this would result in
- dnl an error when it's used with --version below
- WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5"
-
- WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
- wx_config_major_version=`echo $WX_VERSION | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- wx_config_minor_version=`echo $WX_VERSION | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- wx_config_micro_version=`echo $WX_VERSION | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- wx_requested_major_version=`echo $min_wx_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- wx_requested_minor_version=`echo $min_wx_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- wx_requested_micro_version=`echo $min_wx_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version],
- [$wx_requested_minor_version],
- [$wx_requested_micro_version])
-
- if test -n "$wx_ver_ok"; then
- AC_MSG_RESULT(yes (version $WX_VERSION))
- WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`
-
- dnl is this even still appropriate? --static is a real option now
- dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
- dnl what the user actually wants, making this redundant at best.
- dnl For now keep it in case anyone actually used it in the past.
- AC_MSG_CHECKING([for wxWidgets static library])
- WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null`
- if test "x$WX_LIBS_STATIC" = "x"; then
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(yes)
- fi
-
- dnl starting with version 2.2.6 wx-config has --cppflags argument
- wx_has_cppflags=""
- if test $wx_config_major_version -gt 2; then
- wx_has_cppflags=yes
- else
- if test $wx_config_major_version -eq 2; then
- if test $wx_config_minor_version -gt 2; then
- wx_has_cppflags=yes
- else
- if test $wx_config_minor_version -eq 2; then
- if test $wx_config_micro_version -ge 6; then
- wx_has_cppflags=yes
- fi
- fi
- fi
- fi
- fi
-
- dnl starting with version 2.7.0 wx-config has --rescomp option
- wx_has_rescomp=""
- if test $wx_config_major_version -gt 2; then
- wx_has_rescomp=yes
- else
- if test $wx_config_major_version -eq 2; then
- if test $wx_config_minor_version -ge 7; then
- wx_has_rescomp=yes
- fi
- fi
- fi
- if test "x$wx_has_rescomp" = x ; then
- dnl cannot give any useful info for resource compiler
- WX_RESCOMP=
- else
- WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp`
- fi
-
- if test "x$wx_has_cppflags" = x ; then
- dnl no choice but to define all flags like CFLAGS
- WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
- WX_CPPFLAGS=$WX_CFLAGS
- WX_CXXFLAGS=$WX_CFLAGS
-
- WX_CFLAGS_ONLY=$WX_CFLAGS
- WX_CXXFLAGS_ONLY=$WX_CFLAGS
- else
- dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS
- WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4`
- WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4`
- WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
-
- WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
- WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
- fi
-
- ifelse([$2], , :, [$2])
-
- else
-
- if test "x$WX_VERSION" = x; then
- dnl no wx-config at all
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(no (version $WX_VERSION is not new enough))
- fi
-
- WX_CFLAGS=""
- WX_CPPFLAGS=""
- WX_CXXFLAGS=""
- WX_LIBS=""
- WX_LIBS_STATIC=""
- WX_RESCOMP=""
-
- if test ! -z "$5"; then
-
- wx_error_message="
- The configuration you asked for $PACKAGE_NAME requires a wxWidgets
- build with the following settings:
- $5
- but such build is not available.
-
- To see the wxWidgets builds available on this system, please use
- 'wx-config --list' command. To use the default build, returned by
- 'wx-config --selected-config', use the options with their 'auto'
- default values."
-
- fi
-
- wx_error_message="
- The requested wxWidgets build couldn't be found.
- $wx_error_message
-
- If you still get this error, then check that 'wx-config' is
- in path, the directory where wxWidgets libraries are installed
- (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
- or equivalent variable and wxWidgets version is $1 or above."
-
- ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3])
-
- fi
- else
-
- WX_CFLAGS=""
- WX_CPPFLAGS=""
- WX_CXXFLAGS=""
- WX_LIBS=""
- WX_LIBS_STATIC=""
- WX_RESCOMP=""
-
- ifelse([$3], , :, [$3])
-
- fi
-
- AC_SUBST(WX_CPPFLAGS)
- AC_SUBST(WX_CFLAGS)
- AC_SUBST(WX_CXXFLAGS)
- AC_SUBST(WX_CFLAGS_ONLY)
- AC_SUBST(WX_CXXFLAGS_ONLY)
- AC_SUBST(WX_LIBS)
- AC_SUBST(WX_LIBS_STATIC)
- AC_SUBST(WX_VERSION)
- AC_SUBST(WX_RESCOMP)
-
- dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols
- dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness):
- WX_VERSION_MAJOR="$wx_config_major_version"
- WX_VERSION_MINOR="$wx_config_minor_version"
- WX_VERSION_MICRO="$wx_config_micro_version"
- AC_SUBST(WX_VERSION_MAJOR)
- AC_SUBST(WX_VERSION_MINOR)
- AC_SUBST(WX_VERSION_MICRO)
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Get information on the wxrc program for making C++, Python and xrs
-dnl resource files.
-dnl
-dnl AC_ARG_ENABLE(...)
-dnl AC_ARG_WITH(...)
-dnl ...
-dnl WX_CONFIG_OPTIONS
-dnl ...
-dnl WX_CONFIG_CHECK(2.6.0, wxWin=1)
-dnl if test "$wxWin" != 1; then
-dnl AC_MSG_ERROR([
-dnl wxWidgets must be installed on your system
-dnl but wx-config script couldn't be found.
-dnl
-dnl Please check that wx-config is in path, the directory
-dnl where wxWidgets libraries are installed (returned by
-dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
-dnl equivalent variable and wxWidgets version is 2.6.0 or above.
-dnl ])
-dnl fi
-dnl
-dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0])
-dnl if test "x$HAVE_WXRC" != x1; then
-dnl AC_MSG_ERROR([
-dnl The wxrc program was not installed or not found.
-dnl
-dnl Please check the wxWidgets installation.
-dnl ])
-dnl fi
-dnl
-dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
-dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
-dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
-dnl
-dnl LDFLAGS="$LDFLAGS $WX_LIBS"
-dnl ---------------------------------------------------------------------------
-
-dnl ---------------------------------------------------------------------------
-dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl
-dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS
-dnl resources. The variable WXRC will be set and substituted in the configure
-dnl script and Makefiles.
-dnl
-dnl Example use:
-dnl WXRC_CHECK([wxrc=1], [wxrc=0])
-dnl ---------------------------------------------------------------------------
-
-dnl
-dnl wxrc program from the wx-config script
-dnl
-AC_DEFUN([WXRC_CHECK],
-[
- AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler])
-
- if test "x$WX_CONFIG_NAME" = x; then
- AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.])
- else
-
- AC_MSG_CHECKING([for wxrc])
-
- if test "x$WXRC" = x ; then
- dnl wx-config --utility is a new addition to wxWidgets:
- _WX_PRIVATE_CHECK_VERSION(2,5,3)
- if test -n "$wx_ver_ok"; then
- WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc`
- fi
- fi
-
- if test "x$WXRC" = x ; then
- AC_MSG_RESULT([not found])
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT([$WXRC])
- ifelse([$1], , :, [$1])
- fi
-
- AC_SUBST(WXRC)
- fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_LIKE_LIBNAME([output-var] [prefix], [name])
-dnl
-dnl Sets the "output-var" variable to the name of a library named with same
-dnl wxWidgets rule.
-dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets
-dnl the $lib variable to:
-dnl 'mine_gtk2ud_test-2.8'
-dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_LIKE_LIBNAME],
- [
- wx_temp="$2""_""$WX_PORT"
-
- dnl add the [u][d] string
- if test "$WX_UNICODE" = "1"; then
- wx_temp="$wx_temp""u"
- fi
- if test "$WX_DEBUG" = "1"; then
- wx_temp="$wx_temp""d"
- fi
-
- dnl complete the name of the lib
- wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"
-
- dnl save it in the user's variable
- $1=$wx_temp
- ])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO
-dnl
-dnl Two little custom macros which define the ENABLE/WITH configure arguments.
-dnl Macro arguments:
-dnl $1 = the name of the --enable / --with feature
-dnl $2 = the name of the variable associated
-dnl $3 = the description of that feature
-dnl $4 = the default value for that feature
-dnl $5 = additional action to do in case option is given with "yes" value
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
- [AC_ARG_ENABLE($1,
- AC_HELP_STRING([--enable-$1], [$3 (default is $4)]),
- [], [enableval="$4"])
-
- dnl Show a message to the user about this option
- AC_MSG_CHECKING([for the --enable-$1 option])
- if test "$enableval" = "yes" ; then
- AC_MSG_RESULT([yes])
- $2=1
- $5
- elif test "$enableval" = "no" ; then
- AC_MSG_RESULT([no])
- $2=0
- elif test "$enableval" = "auto" ; then
- AC_MSG_RESULT([will be automatically detected])
- $2="auto"
- else
- AC_MSG_ERROR([
- Unrecognized option value (allowed values: yes, no, auto)
- ])
- fi
- ])
-
-AC_DEFUN([WX_ARG_WITH_YESNOAUTO],
- [AC_ARG_WITH($1,
- AC_HELP_STRING([--with-$1], [$3 (default is $4)]),
- [], [withval="$4"])
-
- dnl Show a message to the user about this option
- AC_MSG_CHECKING([for the --with-$1 option])
- if test "$withval" = "yes" ; then
- AC_MSG_RESULT([yes])
- $2=1
- $5
- dnl NB: by default we don't allow --with-$1=no option
- dnl since it does not make much sense !
- elif test "$6" = "1" -a "$withval" = "no" ; then
- AC_MSG_RESULT([no])
- $2=0
- elif test "$withval" = "auto" ; then
- AC_MSG_RESULT([will be automatically detected])
- $2="auto"
- else
- AC_MSG_ERROR([
- Unrecognized option value (allowed values: yes, auto)
- ])
- fi
- ])
-
-
-dnl ---------------------------------------------------------------------------
-dnl WX_STANDARD_OPTIONS([options-to-add])
-dnl
-dnl Adds to the configure script one or more of the following options:
-dnl --enable-[debug|unicode|shared|wxshared|wxdebug]
-dnl --with-[gtk|msw|motif|x11|mac|dfb]
-dnl --with-wxversion
-dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED,
-dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values.
-dnl
-dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the
-dnl --enable-unicode option (in boolean format) while the second indicates
-dnl if wxWidgets was built in Unicode mode (and still is in boolean format).
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_STANDARD_OPTIONS],
- [
-
- dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if
- dnl the $1 argument contains respectively the debug,unicode or shared options.
-
- dnl be careful here not to set debug flag if only "wxdebug" was specified
- ifelse(regexp([$1], [\bdebug]), [-1],,
- [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])])
-
- ifelse(index([$1], [unicode]), [-1],,
- [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])])
-
- ifelse(regexp([$1], [\bshared]), [-1],,
- [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])])
-
- dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option
- dnl which must be able to accept the auto|gtk1|gtk2|msw|... values
- ifelse(index([$1], [toolkit]), [-1],,
- [
- AC_ARG_WITH([toolkit],
- AC_HELP_STRING([--with-toolkit],
- [Build against a specific wxWidgets toolkit (default is auto)]),
- [], [withval="auto"])
-
- dnl Show a message to the user about this option
- AC_MSG_CHECKING([for the --with-toolkit option])
- if test "$withval" = "auto" ; then
- AC_MSG_RESULT([will be automatically detected])
- TOOLKIT="auto"
- else
- TOOLKIT="$withval"
-
- dnl PORT must be one of the allowed values
- if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \
- "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
- "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \
- "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then
- AC_MSG_ERROR([
- Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11)
- ])
- fi
-
- AC_MSG_RESULT([$TOOLKIT])
- fi
- ])
-
- dnl ****** IMPORTANT *******
- dnl Unlike for the UNICODE setting, you can build your program in
- dnl shared mode against a static build of wxWidgets. Thus we have the
- dnl following option which allows these mixtures. E.g.
- dnl
- dnl ./configure --disable-shared --with-wxshared
- dnl
- dnl will build your library in static mode against the first available
- dnl shared build of wxWidgets.
- dnl
- dnl Note that's not possible to do the viceversa:
- dnl
- dnl ./configure --enable-shared --without-wxshared
- dnl
- dnl Doing so you would try to build your library in shared mode against a static
- dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) !
- dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES
- dnl (where we know what 'auto' should be expanded to).
- dnl
- dnl If you try to build something in ANSI mode against a UNICODE build
- dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets,
- dnl then at best you'll get ton of linking errors !
- dnl ************************
-
- ifelse(index([$1], [wxshared]), [-1],,
- [
- WX_ARG_WITH_YESNOAUTO(
- [wxshared], [WX_SHARED],
- [Force building against a shared build of wxWidgets, even if --disable-shared is given],
- [auto], [], [1])
- ])
-
- dnl Just like for SHARED and WX_SHARED it may happen that some adventurous
- dnl peoples will want to mix a wxWidgets release build with a debug build of
- dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables.
- ifelse(index([$1], [wxdebug]), [-1],,
- [
- WX_ARG_WITH_YESNOAUTO(
- [wxdebug], [WX_DEBUG],
- [Force building against a debug build of wxWidgets, even if --disable-debug is given],
- [auto], [], [1])
- ])
-
- dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option
- dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values
- ifelse(index([$1], [wxversion]), [-1],,
- [
- AC_ARG_WITH([wxversion],
- AC_HELP_STRING([--with-wxversion],
- [Build against a specific version of wxWidgets (default is auto)]),
- [], [withval="auto"])
-
- dnl Show a message to the user about this option
- AC_MSG_CHECKING([for the --with-wxversion option])
- if test "$withval" = "auto" ; then
- AC_MSG_RESULT([will be automatically detected])
- WX_RELEASE="auto"
- else
-
- wx_requested_major_version=`echo $withval | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
- wx_requested_minor_version=`echo $withval | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
-
- dnl both vars above must be exactly 1 digit
- if test "${#wx_requested_major_version}" != "1" -o \
- "${#wx_requested_minor_version}" != "1" ; then
- AC_MSG_ERROR([
- Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0)
- ])
- fi
-
- WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version"
- AC_MSG_RESULT([$WX_RELEASE])
- fi
- ])
-
- if test "$WX_DEBUG_CONFIGURE" = "1"; then
- echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG"
- echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE"
- echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED"
- echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT"
- echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE"
- fi
- ])
-
-
-dnl ---------------------------------------------------------------------------
-dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
-dnl
-dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
-dnl which are different from "auto".
-dnl Thus this macro needs to be called only once all options have been set.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
- [
- if test "$WX_SHARED" = "1" ; then
- WXCONFIG_FLAGS="--static=no "
- elif test "$WX_SHARED" = "0" ; then
- WXCONFIG_FLAGS="--static=yes "
- fi
-
- if test "$WX_DEBUG" = "1" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes "
- elif test "$WX_DEBUG" = "0" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no "
- fi
-
- dnl The user should have set WX_UNICODE=UNICODE
- if test "$WX_UNICODE" = "1" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes "
- elif test "$WX_UNICODE" = "0" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
- fi
-
- if test "$TOOLKIT" != "auto" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
- fi
-
- if test "$WX_RELEASE" != "auto" ; then
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
- fi
-
- dnl strip out the last space of the string
- WXCONFIG_FLAGS=${WXCONFIG_FLAGS% }
-
- if test "$WX_DEBUG_CONFIGURE" = "1"; then
- echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS"
- fi
- ])
-
-
-dnl ---------------------------------------------------------------------------
-dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG]
-dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl
-dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets
-dnl additional CPP flags and put the result of the search in WX_$RESULTVAR
-dnl also adding the "yes" or "no" message result to MSG.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
- [
- if test "$$1" = "auto" ; then
-
- dnl The user does not have particular preferences for this option;
- dnl so we will detect the wxWidgets relative build setting and use it
- AC_MSG_CHECKING([$3])
-
- dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2
- dnl string or to 0 otherwise.
- dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it
- dnl doesn't work; we use 'expr STRING : REGEXP' instead
- WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*")
-
- if test "$WX_$1" != "0"; then
- WX_$1=1
- AC_MSG_RESULT([yes])
- ifelse([$4], , :, [$4])
- else
- WX_$1=0
- AC_MSG_RESULT([no])
- ifelse([$5], , :, [$5])
- fi
- else
-
- dnl Use the setting given by the user
- WX_$1=$$1
- fi
- ])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_DETECT_STANDARD_OPTION_VALUES
-dnl
-dnl Detects the values of the following variables:
-dnl 1) WX_RELEASE
-dnl 2) WX_UNICODE
-dnl 3) WX_DEBUG
-dnl 4) WX_SHARED (and also WX_STATIC)
-dnl 5) WX_PORT
-dnl from the previously selected wxWidgets build; this macro in fact must be
-dnl called *after* calling the WX_CONFIG_CHECK macro.
-dnl
-dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set
-dnl by WX_CONFIG_CHECK macro
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
- [
- dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits,
- dnl while WX_RELEASE only the major.minor ones.
- WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR"
- if test $WX_RELEASE -lt 26 ; then
-
- AC_MSG_ERROR([
- Cannot detect the wxWidgets configuration for the selected wxWidgets build
- since its version is $WX_VERSION < 2.6.0; please install a newer
- version of wxWidgets.
- ])
- fi
-
- dnl The wx-config we are using understands the "--selected_config"
- dnl option which returns an easy-parseable string !
- WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config)
-
- if test "$WX_DEBUG_CONFIGURE" = "1"; then
- echo "[[dbg]] Using wx-config --selected-config"
- echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
- fi
-
-
- dnl we could test directly for WX_SHARED with a line like:
- dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],
- dnl [if wxWidgets was built in SHARED mode])
- dnl but wx-config --selected-config DOES NOT outputs the 'shared'
- dnl word when wx was built in shared mode; it rather outputs the
- dnl 'static' word when built in static mode.
- if test $WX_SHARED = "1"; then
- STATIC=0
- elif test $WX_SHARED = "0"; then
- STATIC=1
- elif test $WX_SHARED = "auto"; then
- STATIC="auto"
- fi
-
- dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
- _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode],
- [if wxWidgets was built with UNICODE enabled])
- _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug],
- [if wxWidgets was built in DEBUG mode])
- _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static],
- [if wxWidgets was built in STATIC mode])
-
- dnl init WX_SHARED from WX_STATIC
- if test "$WX_STATIC" != "0"; then
- WX_SHARED=0
- else
- WX_SHARED=1
- fi
-
- AC_SUBST(WX_UNICODE)
- AC_SUBST(WX_DEBUG)
- AC_SUBST(WX_SHARED)
-
- dnl detect the WX_PORT to use
- if test "$TOOLKIT" = "auto" ; then
-
- dnl The user does not have particular preferences for this option;
- dnl so we will detect the wxWidgets relative build setting and use it
- AC_MSG_CHECKING([which wxWidgets toolkit was selected])
-
- WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
- WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
- WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
- WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
- WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
- WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*")
- WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")
- WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")
-
- WX_PORT="unknown"
- if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
- if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
- if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
- if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
- if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
- if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi
- if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi
- if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi
-
- dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac
- dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above)
- WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*")
- if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi
-
- dnl check at least one of the WX_*PORT has been set !
-
- if test "$WX_PORT" = "unknown" ; then
- AC_MSG_ERROR([
- Cannot detect the currently installed wxWidgets port !
- Please check your 'wx-config --cxxflags'...
- ])
- fi
-
- AC_MSG_RESULT([$WX_PORT])
- else
-
- dnl Use the setting given by the user
- if test -z "$TOOLKIT" ; then
- WX_PORT=$TOOLKIT
- else
- dnl try with PORT
- WX_PORT=$PORT
- fi
- fi
-
- AC_SUBST(WX_PORT)
-
- if test "$WX_DEBUG_CONFIGURE" = "1"; then
- echo "[[dbg]] Values of all WX_* options after final detection:"
- echo "[[dbg]] WX_DEBUG: $WX_DEBUG"
- echo "[[dbg]] WX_UNICODE: $WX_UNICODE"
- echo "[[dbg]] WX_SHARED: $WX_SHARED"
- echo "[[dbg]] WX_RELEASE: $WX_RELEASE"
- echo "[[dbg]] WX_PORT: $WX_PORT"
- fi
-
- dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when
- dnl the user gives the options:
- dnl ./configure --enable-shared --without-wxshared
- dnl or just do
- dnl ./configure --enable-shared
- dnl but there is only a static build of wxWidgets available.
- if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then
- AC_MSG_ERROR([
- Cannot build shared library against a static build of wxWidgets !
- This error happens because the wxWidgets build which was selected
- has been detected as static while you asked to build $PACKAGE_NAME
- as shared library and this is not possible.
- Use the '--disable-shared' option to build $PACKAGE_NAME
- as static library or '--with-wxshared' to use wxWidgets as shared library.
- ])
- fi
-
- dnl now we can finally update the DEBUG,UNICODE,SHARED options
- dnl to their final values if they were set to 'auto'
- if test "$DEBUG" = "auto"; then
- DEBUG=$WX_DEBUG
- fi
- if test "$UNICODE" = "auto"; then
- UNICODE=$WX_UNICODE
- fi
- if test "$SHARED" = "auto"; then
- SHARED=$WX_SHARED
- fi
- if test "$TOOLKIT" = "auto"; then
- TOOLKIT=$WX_PORT
- fi
-
- dnl in case the user needs a BUILD=debug/release var...
- if test "$DEBUG" = "1"; then
- BUILD="debug"
- elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then
- BUILD="release"
- fi
-
- dnl respect the DEBUG variable adding the optimize/debug flags
- dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we
- dnl don't need to set them, too
- if test "$DEBUG" = "1"; then
- CXXFLAGS="$CXXFLAGS -g -O0"
- CFLAGS="$CFLAGS -g -O0"
- else
- CXXFLAGS="$CXXFLAGS -O2"
- CFLAGS="$CFLAGS -O2"
- fi
- ])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for],
-dnl [what to print when var is 1],
-dnl [what to print when var is 0])
-dnl
-dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0.
-dnl This macro mainly exists just to make configure.ac scripts more readable.
-dnl
-dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments
-dnl if you want that m4 avoid to throw away the spaces prefixed to the
-dnl argument value.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_BOOLOPT_SUMMARY],
- [
- if test "x$$1" = "x1" ; then
- echo $2
- elif test "x$$1" = "x0" ; then
- echo $3
- else
- echo "$1 is $$1"
- fi
- ])
-
-dnl ---------------------------------------------------------------------------
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
-dnl
-dnl Shows a summary message to the user about the WX_* variable contents.
-dnl This macro is used typically at the end of the configure script.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG],
- [
- echo
- echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION"
- echo " has the following settings:"
- WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"])
- WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
- WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"])
- echo " - VERSION: $WX_VERSION"
- echo " - PORT: $WX_PORT"
- ])
-
-
-dnl ---------------------------------------------------------------------------
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END
-dnl
-dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info
-dnl about the configuration of the package which used the wxpresets.
-dnl
-dnl Typical usage:
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
-dnl echo " - Package setting 1: $SETTING1"
-dnl echo " - Package setting 2: $SETTING1"
-dnl ...
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END
-dnl
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN],
- [
- echo
- echo " ----------------------------------------------------------------"
- echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
- echo " Summary of main configuration settings for $PACKAGE_NAME:"
- WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"])
- WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
- WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"])
- ])
-
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END],
- [
- WX_STANDARD_OPTIONS_SUMMARY_MSG
- echo
- echo " Now, just run make."
- echo " ----------------------------------------------------------------"
- echo
- ])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Deprecated macro wrappers
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS])
-AC_DEFUN([AM_PATH_WXCONFIG], [
- WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5])
-])
-AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])])
diff --git a/tests/Makefile b/tests/Makefile
deleted file mode 100644
index 137430854..000000000
--- a/tests/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
-
-GTEST_ROOT ?= $(TOP)vendor/googletest
-GTEST_FILE := ${GTEST_ROOT}/src/gtest-all
-
-run_PCH := $(d)support/tests_pre.h
-run_CPPFLAGS := -I$(TOP)libaegisub/include -I$(TOP) -I$(d)support \
- -I$(GTEST_ROOT) -I$(GTEST_ROOT)/include $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
-run_CXXFLAGS := -Wno-unused-value -Wno-sign-compare
-run_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_UCHARDET) $(LIBS_PTHREAD)
-run_OBJ := \
- $(patsubst %.cpp,%.o,$(wildcard $(d)tests/*.cpp)) \
- $(d)support/main.o \
- $(d)support/util.o \
- $(TOP)lib/libaegisub.a \
- $(GTEST_FILE).o
-
-# This bit of goofiness is to make it only try to build the tests if google
-# test can be found and silently skip it if not, by using $(wildcard) to check
-# for file existence
-PROGRAM += $(subst $(GTEST_FILE).cc,$(d)run,$(wildcard $(GTEST_FILE).cc))
-
-ifeq (yes, $(BUILD_DARWIN))
-run_LIBS += -framework ApplicationServices -framework Foundation
-endif
-
-$(d)data: $(d)setup.sh
- cd $(TOP)tests; ./setup.sh
-
-gtest_filter ?= *
-test-libaegisub: $(d)run $(d)data
- cd $(TOP)tests; ./run --gtest_filter="$(gtest_filter)"
-
-test: $(subst $(GTEST_FILE).cc,test-libaegisub,$(wildcard $(GTEST_FILE).cc))
-
-include $(TOP)Makefile.target