ChangeLog:
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.common: Revamp for new configury. Add default compilation targets, include .E processing. Add magic for allowing "CFLAGS" to control optimization options in "CXXFLAGS". * configure.cygwin: New include for Cygwin configure.in's. * acinclude.m4: Delete old definitions. Implement AC_WINDOWS_HEADERS, AC_WINDOWS_LIBS, AC_CYGWIN_INCLUDES, target_builddir, winsup_srcdir. * aclocal.m4: Regenerate. * autogen.sh: New file. * ccwrap: New script. * c++wrap: New script. * config.guess: New script. * config.sub: New script. * configure: Regenerate. * configure.in: Eliminate LIB_AC_PROG_* calls in favor of standard. Delete ancient target test. * install-sh: New script. cygserver/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. cygwin/ChangeLog: 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * select.cc (select): Don't return -1 when we've timed out after looping. 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. (datarootdir): Add variable setting. (winver_stamp): Accommodate changes to mkvers.sh setting. (libc.a): Fix race when libm.a might not have been built yet. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * mkvers.sh: Find include directives via CFLAGS and friends rather than assuming that w32api lives nearby. utils/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * configure.in: Revamp for new configury. * Makefile.in: Revamp for new configury. Rename ALL_* to just *. Always use "VERBOSE" setting. (MINGW_CXX): Don't include CFLAGS in definition. (all): Define target first, before everything else so that it is the default. (ps.exe): Don't add useless -lcygwin. (ldh.exe): For consistency, add to existing MINGW_LDFLAGS rather than redefining them. (cygcheck.exe): Always include -lz for MINGW_LDFLAGS. Don't try to figure out where to find it. (dumper.exe): Simplify check. Assume libraries are installed rather than trying to retrieve from source tree. (install): Just use /bin/mkdir to create directories. (Makefile): Regenerate when standard dependencies change. * dump_setup.cc: Always include zlib.h. Remove accommodations for it possibly not existing. * parse_pe.cc: Add define which allows building with installed binutils package. * dumper.cc: Ditto.
This commit is contained in:
parent
1cfd36169c
commit
4c36016b57
|
@ -1,3 +1,22 @@
|
|||
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* Makefile.common: Revamp for new configury. Add default compilation
|
||||
targets, include .E processing. Add magic for allowing "CFLAGS" to
|
||||
control optimization options in "CXXFLAGS".
|
||||
* configure.cygwin: New include for Cygwin configure.in's.
|
||||
* acinclude.m4: Delete old definitions. Implement AC_WINDOWS_HEADERS,
|
||||
AC_WINDOWS_LIBS, AC_CYGWIN_INCLUDES, target_builddir, winsup_srcdir.
|
||||
* aclocal.m4: Regenerate.
|
||||
* autogen.sh: New file.
|
||||
* ccwrap: New script.
|
||||
* c++wrap: New script.
|
||||
* config.guess: New script.
|
||||
* config.sub: New script.
|
||||
* configure: Regenerate.
|
||||
* configure.in: Eliminate LIB_AC_PROG_* calls in favor of standard.
|
||||
Delete ancient target test.
|
||||
* install-sh: New script.
|
||||
|
||||
2012-11-07 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* mingw: Delete obsolete directory.
|
||||
|
|
|
@ -8,154 +8,45 @@
|
|||
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
# details.
|
||||
|
||||
# This makefile requires GNU make.
|
||||
define justdir
|
||||
$(patsubst %/,%,$(dir $1))
|
||||
endef
|
||||
|
||||
CFLAGS_COMMON:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -D_SDKDDKVER_H
|
||||
MALLOC_DEBUG:=#-DMALLOC_DEBUG -I/cygnus/src/uberbaum/winsup/cygwin/dlmalloc
|
||||
MALLOC_OBJ:=#/cygnus/src/uberbaum/winsup/cygwin/dlmalloc/malloc.o
|
||||
define libname
|
||||
$(realpath $(shell ${CC} --print-file-name=$1 $2))
|
||||
endef
|
||||
|
||||
override srcdir:=${shell cd $(srcdir); pwd}
|
||||
ifneq (,${filter-out /%,$(srcdir)})
|
||||
updir:=$(srcdir)/..
|
||||
updir1:=$(updir)/..
|
||||
else
|
||||
updir:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(srcdir)):::}}
|
||||
ifneq (,${findstring /,$(updir)})
|
||||
updir1:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(updir)):::}}
|
||||
else
|
||||
updir1:=$(updir)/..
|
||||
endif
|
||||
endif
|
||||
export PATH:=${winsup_srcdir}:${PATH}
|
||||
|
||||
pwd:=${shell pwd}
|
||||
ifneq "${filter winsup%,${notdir $(pwd)}}" ""
|
||||
here:=${pwd}/cygwin
|
||||
else
|
||||
here:=${dir $(pwd)}cygwin
|
||||
endif
|
||||
bupdir:=${shell cd $(here)/..; pwd}
|
||||
ifneq (,${filter-out /%,$(bupdir)})
|
||||
bupdir1:=../..
|
||||
bupdir2:=../../..
|
||||
else
|
||||
ifneq (,${findstring /,$(bupdir)})
|
||||
bupdir1:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(bupdir)):::}}
|
||||
else
|
||||
bupdir1:=$(bupdir)/..
|
||||
endif
|
||||
ifneq (,${findstring /,$(bupdir1)})
|
||||
bupdir2:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(bupdir1)):::}}
|
||||
else
|
||||
bupdir2:=$(bupdir1)/..
|
||||
endif
|
||||
endif
|
||||
# Allow CFLAGS=-O,-g to control CXXFLAGS too
|
||||
opt=$(filter -O%,${CFLAGS}) $(filter -g,${CFLAGS})
|
||||
override CXXFLAGS:=${filter-out -g,$(filter-out -O%,${CXXFLAGS})} ${opt}
|
||||
|
||||
newlib_source:=$(updir1)/newlib
|
||||
newlib_build:=$(bupdir1)/newlib
|
||||
cygwin_build:=$(bupdir)/cygwin
|
||||
cygwin_source:=$(updir)/cygwin
|
||||
utils_build:=$(bupdir)/utils
|
||||
utils_source:=$(updir)/utils
|
||||
ifeq (,${findstring $(newlib_source)/libc/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
|
||||
newlib_include:=-I$(newlib_source)/libc/include
|
||||
endif
|
||||
ifeq (,${findstring $(cygwin_source)/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
|
||||
cygwin_include:=-I$(cygwin_source)/include
|
||||
endif
|
||||
cflags_common:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0
|
||||
COMPILE.cc=c++wrap ${CXXFLAGS} -fno-rtti -fno-exceptions ${cflags_common}
|
||||
COMPILE.c=ccwrap ${CFLAGS} ${cflags_common}
|
||||
|
||||
nostdincxx:=-nostdinc++
|
||||
top_srcdir:=$(call justdir,${winsup_srcdir})
|
||||
top_builddir:=$(call justdir,${target_builddir})
|
||||
|
||||
cygwin_build:=${target_builddir}/winsup/cygwin
|
||||
newlib_build:=${target_builddir}/newlib
|
||||
|
||||
nostdlib:=-nostdlib
|
||||
|
||||
ifeq (,${nostdlib})
|
||||
nostdinc:=
|
||||
endif
|
||||
VPATH:=${srcdir}
|
||||
|
||||
INCLUDES:=-I. $(cygwin_include) -I$(cygwin_source) $(newlib_include)
|
||||
ifdef CONFIG_DIR
|
||||
INCLUDES+=-I$(CONFIG_DIR)
|
||||
endif
|
||||
|
||||
MINGW_LDFLAGS:=-static
|
||||
MINGW_CFLAGS:=
|
||||
MINGW_CXXFLAGS:=
|
||||
|
||||
GCC_DEFAULT_OPTIONS:=$(CFLAGS_COMMON) $(CFLAGS_CONFIG) $(INCLUDES)
|
||||
|
||||
# Link in libc and libm from newlib
|
||||
|
||||
LIBC:=$(newlib_build)/libc/libc.a
|
||||
LIBM:=$(newlib_build)/libm/libm.a
|
||||
CRT0:=$(cygwin_build)/crt0.o
|
||||
|
||||
ALL_CFLAGS=$(DEFS) $(MALLOC_DEBUG) $(CFLAGS) $(GCC_DEFAULT_OPTIONS)
|
||||
ALL_CXXFLAGS=$(DEFS) $(MALLOC_DEBUG) $(CXXFLAGS) $(GCC_DEFAULT_OPTIONS)
|
||||
|
||||
ifndef PREPROCESS
|
||||
c=-c
|
||||
o=.o
|
||||
else
|
||||
c=-E -dD
|
||||
o=.E
|
||||
endif
|
||||
|
||||
libgcc:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}}
|
||||
gcc_libdir:=${word 1,${dir $(libgcc)}}
|
||||
ifeq (,${findstring $(gcc_libdir),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
|
||||
GCC_INCLUDE:=${subst //,/,-I$(gcc_libdir)/include}
|
||||
endif
|
||||
|
||||
COMPILE_CXX=$(CXX) $c $(if $($(*F)_STDINCFLAGS),,$(nostdincxx) $(nostdinc)) \
|
||||
$(ALL_CXXFLAGS) $(GCC_INCLUDE) -fno-rtti -fno-exceptions
|
||||
COMPILE_CC=$(CC) $c $(if $($(*F)_STDINCFLAGS),,$(nostdinc)) $(ALL_CFLAGS) $(GCC_INCLUDE)
|
||||
|
||||
vpath %.a $(cygwin_build):$(newlib_build)/libc:$(newlib_build)/libm
|
||||
|
||||
MAKEOVERRIDES_WORKAROUND=${wordlist 2,1,a b c}
|
||||
|
||||
ifneq ($(MAKEOVERRIDES_WORKAROUND),)
|
||||
override MAKE:=$(MAKE) $(MAKEOVERRIDES)
|
||||
MAKEOVERRIDES:=
|
||||
export MAKEOVERRIDES
|
||||
endif
|
||||
|
||||
ifdef RPATH_ENVVAR
|
||||
VERBOSE=1
|
||||
endif
|
||||
|
||||
ifneq "${findstring -B,$(COMPILE_CXX) $(COMPILE_CC)}" ""
|
||||
VERBOSE=1
|
||||
endif
|
||||
|
||||
.PRECIOUS: %.o
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cc .def .a .o .d .s .E
|
||||
|
||||
%.o: %.cc
|
||||
ifdef VERBOSE
|
||||
$(COMPILE_CXX) -o $(@D)/$(*F)$o $<
|
||||
else
|
||||
@echo $(CXX) $c $(CXXFLAGS) ... $(*F).cc
|
||||
@$(COMPILE_CXX) -o $(@D)/$(*F)$o $<
|
||||
endif
|
||||
$(strip ${COMPILE.cc} -c -o $@ $<)
|
||||
|
||||
%.o: %.c
|
||||
ifdef VERBOSE
|
||||
$(COMPILE_CC) -o $(@D)/$(*F)$o $<
|
||||
else
|
||||
@echo $(CC) $c $(CFLAGS) ... $(*F).c
|
||||
@$(COMPILE_CC) -o $(@D)/$(*F)$o $<
|
||||
endif
|
||||
$(strip ${COMPILE.c} -c -o $@ $<)
|
||||
|
||||
$(bupdir1)/libiberty/%.o: $(updir1)/libiberty/%.c
|
||||
@$(MAKE) -C $(@D) $(@F)
|
||||
%.E: %.cc
|
||||
$(strip ${COMPILE.cc} -E -dD -o $@ $<)
|
||||
|
||||
all:
|
||||
|
||||
# For auto-rebuilding the Makefile
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
Makefile: Makefile.in $(srcdir)/configure.in config.status
|
||||
$(SHELL) config.status
|
||||
|
||||
config.status: configure
|
||||
$(SHELL) config.status --recheck
|
||||
%.E: %.c
|
||||
$(strip ${COMPILE.c} -E -dD -o $@ $<)
|
||||
|
|
|
@ -1,43 +1,83 @@
|
|||
dnl This provides configure definitions used by all the winsup
|
||||
dnl This provides configure definitions used by all the cygwin
|
||||
dnl configure.in files.
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC_GNU],
|
||||
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
|
||||
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi])])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
: ${CC:=gcc}
|
||||
AC_PROG_CC
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_HEADERS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-headers],
|
||||
[AS_HELP_STRING([--with-windows-headers=DIR],
|
||||
[specify where the windows includes are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])]
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CXX],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
if test -z "$CXX"; then
|
||||
AC_CHECK_TOOL(CXX, g++, c++, , , )
|
||||
: ${CXX:=g++}
|
||||
AC_PROG_CXX
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_LIBS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-libs],
|
||||
[AS_HELP_STRING([--with-windows-libs=DIR],
|
||||
[specify where the windows libraries are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])]
|
||||
)
|
||||
windows_libdir=$(realdirpath "$with_windows_libs")
|
||||
if test -z "$windows_libdir"; then
|
||||
windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
|
||||
if test -z "$windows_libdir"; then
|
||||
AC_MSG_ERROR([cannot find windows library files])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(windows_libdir)
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFUN([AC_CYGWIN_INCLUDES], [
|
||||
addto_CPPFLAGS -nostdinc
|
||||
: ${ac_cv_prog_CXX:=$CXX}
|
||||
: ${ac_cv_prog_CC:=$CC}
|
||||
|
||||
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
||||
if test -z "$cygwin_headers"; then
|
||||
AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
|
||||
fi
|
||||
|
||||
CXXFLAGS='$(CFLAGS)'
|
||||
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
||||
if test -z "$newlib_headers"; then
|
||||
AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
|
||||
fi
|
||||
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
||||
|
||||
if test -n "$with_windows_headers"; then
|
||||
if test -e "$with_windows_headers/windef.h"; then
|
||||
windows_headers="$with_windows_headers"
|
||||
else
|
||||
AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
|
||||
fi
|
||||
elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
|
||||
windows_headers="$winsup_srcdir/w32api/include"
|
||||
else
|
||||
windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
|
||||
if test -z "$windows_headers" -o ! -d "$windows_headers"; then
|
||||
AC_MSG_ERROR([cannot find windows header files])
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
CXX=$ac_cv_prog_CXX
|
||||
export CC
|
||||
export CXX
|
||||
AC_SUBST(windows_headers)
|
||||
AC_SUBST(newlib_headers)
|
||||
AC_SUBST(cygwin_headers)
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CONFIGURE_ARGS], [
|
||||
configure_args=X
|
||||
for f in $ac_configure_args; do
|
||||
case "$f" in
|
||||
*--srcdir*) ;;
|
||||
*) configure_args="$configure_args $f" ;;
|
||||
esac
|
||||
done
|
||||
configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
|
||||
AC_SUBST(configure_args)
|
||||
])
|
||||
|
||||
AC_SUBST(target_builddir)
|
||||
AC_SUBST(winsup_srcdir)
|
||||
|
|
|
@ -11,66 +11,4 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# GCC_NO_EXECUTABLES
|
||||
# -----------------
|
||||
# FIXME: The GCC team has specific needs which the current Autoconf
|
||||
# framework cannot solve elegantly. This macro implements a dirty
|
||||
# hack until Autoconf is able to provide the services its users
|
||||
# need.
|
||||
#
|
||||
# Several of the support libraries that are often built with GCC can't
|
||||
# assume the tool-chain is already capable of linking a program: the
|
||||
# compiler often expects to be able to link with some of such
|
||||
# libraries.
|
||||
#
|
||||
# In several of these libraries, workarounds have been introduced to
|
||||
# avoid the AC_PROG_CC_WORKS test, that would just abort their
|
||||
# configuration. The introduction of AC_EXEEXT, enabled either by
|
||||
# libtool or by CVS autoconf, have just made matters worse.
|
||||
#
|
||||
# Unlike the previous AC_NO_EXECUTABLES, this test does not
|
||||
# disable link tests at autoconf time, but at configure time.
|
||||
# This allows AC_NO_EXECUTABLES to be invoked conditionally.
|
||||
AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
|
||||
[m4_divert_push([KILL])
|
||||
|
||||
AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
|
||||
AC_BEFORE([$0], [AC_LINK_IFELSE])
|
||||
|
||||
m4_define([_AC_COMPILER_EXEEXT],
|
||||
AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
|
||||
# FIXME: Cleanup?
|
||||
AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
|
||||
if test x$gcc_no_link = xyes; then
|
||||
# Setting cross_compile will disable run tests; it will
|
||||
# also disable AC_CHECK_FILE but that's generally
|
||||
# correct if we can't link.
|
||||
cross_compiling=yes
|
||||
EXEEXT=
|
||||
else
|
||||
m4_defn([_AC_COMPILER_EXEEXT])dnl
|
||||
fi
|
||||
)
|
||||
|
||||
m4_define([AC_LINK_IFELSE],
|
||||
if test x$gcc_no_link = xyes; then
|
||||
AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
|
||||
fi
|
||||
m4_defn([AC_LINK_IFELSE]))
|
||||
|
||||
dnl This is a shame. We have to provide a default for some link tests,
|
||||
dnl similar to the default for run tests.
|
||||
m4_define([AC_FUNC_MMAP],
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
|
||||
ac_cv_func_mmap_fixed_mapped=no
|
||||
fi
|
||||
fi
|
||||
if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
|
||||
m4_defn([AC_FUNC_MMAP])
|
||||
fi)
|
||||
|
||||
m4_divert_pop()dnl
|
||||
])# GCC_NO_EXECUTABLES
|
||||
|
||||
m4_include([acinclude.m4])
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh -e
|
||||
if ! /usr/bin/test -e config.guess; then
|
||||
/usr/bin/wget -q -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
|
||||
/bin/chmod a+x config.guess
|
||||
fi
|
||||
if ! /usr/bin/test -e config.sub; then
|
||||
/usr/bin/wget -q -O config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
|
||||
/bin/chmod a+x config.sub
|
||||
fi
|
||||
/usr/bin/aclocal --force
|
||||
/usr/bin/autoconf -f
|
||||
/bin/rm -rf autom4te.cache
|
||||
res=0
|
||||
for d in cygwin utils cygserver; do
|
||||
(cd $d && exec ./autogen.sh) || res=1
|
||||
done
|
||||
exit $res
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use File::Basename;
|
||||
my $pgm = basename($0);
|
||||
(my $wrapper = $pgm) =~ s/\+\+/c/o;
|
||||
exec $wrapper, '++', @ARGV;
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/perl
|
||||
use Cwd;
|
||||
use strict;
|
||||
my $cxx;
|
||||
my $ccorcxx;
|
||||
if ($ARGV[0] ne '++') {
|
||||
$ccorcxx = 'CC';
|
||||
$cxx = 0;
|
||||
} else {
|
||||
shift @ARGV;
|
||||
$ccorcxx = 'CXX';
|
||||
$cxx = 1;
|
||||
}
|
||||
die "$0: $ccorcxx environment variable does not exist\n" unless exists $ENV{$ccorcxx};
|
||||
my @compiler = split ' ', $ENV{$ccorcxx};
|
||||
if ("@ARGV" !~ / -nostdinc/o) {
|
||||
my $fd;
|
||||
push @compiler, ($cxx ? '-xc++' : '-xc');
|
||||
if (!open $fd, '-|') {
|
||||
open STDERR, '>&', \*STDOUT;
|
||||
exec @compiler, '/dev/null', '-v', '-E', '-o', '/dev/null' or die "*** error execing $compiler[0] - $!\n";
|
||||
}
|
||||
$compiler[1] =~ s/xc/nostdinc/o;
|
||||
push @compiler, '-nostdinc' if $cxx;
|
||||
push @compiler, '-I' . $_ for split ' ', $ENV{CCWRAP_HEADERS};
|
||||
push @compiler, '-isystem', $_ for split ' ', $ENV{CCWRAP_SYSTEM_HEADERS};
|
||||
my $finding_paths = 0;
|
||||
while (<$fd>) {
|
||||
if (/^\*\*\*/o) {
|
||||
print;
|
||||
} elsif ($_ eq "#include <...> search starts here:\n") {
|
||||
$finding_paths = 1;
|
||||
} elsif (!$finding_paths) {
|
||||
next;
|
||||
} elsif ($_ eq "End of search list.\n") {
|
||||
last;
|
||||
} elsif (!m%w32api|mingw.*/include%o) {
|
||||
chomp;
|
||||
s/^\s+//;
|
||||
push @compiler, '-isystem', Cwd::abs_path($_);
|
||||
}
|
||||
}
|
||||
push @compiler, '-isystem', $_ for split ' ', $ENV{CCWRAP_DIRAFTER_HEADERS};
|
||||
close $fd;
|
||||
}
|
||||
|
||||
push @compiler, @ARGV;
|
||||
|
||||
print join(' ', '+', @compiler), "\n" if $ENV{CCWRAP_VERBOSE};
|
||||
exec @compiler or die "$0: $compiler[0] failed to execute\n";
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
addto_CPPFLAGS() {
|
||||
local f
|
||||
for f; do
|
||||
case " $CPPFLAGS " in
|
||||
*\ $f\ *) ;;
|
||||
*) CPPFLAGS="$CPPFLAGS $f" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
realdirpath() {
|
||||
[ -z "$1" ] && return 1
|
||||
(cd "$1" 2>/dev/null && pwd)
|
||||
if test $? -ne 0; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
for d in . .. ../.. ../../..; do
|
||||
if test -e "$srcdir/$d/configure.cygwin"; then
|
||||
winsup_srcdir=$(realdirpath "$srcdir/$d")
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$winsup_srcdir"; then
|
||||
echo "cannot find directory containing configure.cygwin" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$srcdir" in
|
||||
*/newlib*) lookfor=newlib ;;
|
||||
*/winsup*) lookfor=winsup ;;
|
||||
*) lookfor=. ;;
|
||||
esac
|
||||
|
||||
for d in . .. ../.. ../../..; do
|
||||
if test -d "$d/$lookfor"; then
|
||||
target_builddir=$(realdirpath "$d")
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$target_builddir"; then
|
||||
echo "cannot determine top build dir, looking for $lookfor" 1>&2
|
||||
exit 1
|
||||
fi
|
|
@ -1,6 +1,6 @@
|
|||
dnl Autoconf configure script for Cygwin.
|
||||
dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006,
|
||||
dnl 2009 Red Hat, Inc.
|
||||
dnl 2009, 2010, 2011, 2012 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This file is part of Cygwin.
|
||||
dnl
|
||||
|
@ -12,30 +12,27 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
|
||||
AC_PREREQ(2.59)dnl
|
||||
AC_INIT(Makefile.in)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
INSTALL=`cd $srcdir/..; echo $(pwd)/install-sh -c`
|
||||
. ${srcdir}/configure.cygwin
|
||||
|
||||
AC_WINDOWS_HEADERS
|
||||
AC_WINDOWS_LIBS
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_NO_EXECUTABLES
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
GCC_NO_EXECUTABLES
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
AC_LANG(C)
|
||||
AC_LANG(C++)
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
LIB_AC_PROG_CXX
|
||||
AC_CYGWIN_INCLUDES
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
INSTALL_LICENSE=
|
||||
|
||||
case "$target" in
|
||||
*cygwin*)
|
||||
if ! test -d $srcdir/cygwin; then
|
||||
AC_MSG_ERROR("No cygwin dir. Can't build Cygwin. Exiting...")
|
||||
fi
|
||||
AC_CONFIG_SUBDIRS(cygwin cygserver lsaauth utils doc)
|
||||
INSTALL_LICENSE="install-license"
|
||||
;;
|
||||
esac
|
||||
AC_CONFIG_SUBDIRS(cygwin utils cygserver lsaauth doc)
|
||||
INSTALL_LICENSE="install-license"
|
||||
|
||||
AC_SUBST(INSTALL_LICENSE)
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* Makefile.in: Revamp for new configury.
|
||||
* configure.in: Revamp for new configury.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Ditto.
|
||||
* autogen.sh: New script.
|
||||
|
||||
2012-10-25 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* bsd_helper.cc (adjust_identity_info): Fix typo in log message.
|
||||
|
|
|
@ -7,10 +7,22 @@
|
|||
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
# details.
|
||||
|
||||
SHELL:=@SHELL@
|
||||
|
||||
srcdir:=@srcdir@
|
||||
VPATH:=@srcdir@
|
||||
target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
export CC:=@CC@
|
||||
export CXX:=@CXX@
|
||||
|
||||
include ${srcdir}/../Makefile.common
|
||||
|
||||
cygwin_build:=${target_builddir}/winsup/cygwin
|
||||
|
||||
# environment variables used by ccwrap
|
||||
export CCWRAP_HEADERS:=$(dir ${srcdir})/cygwin ${cygwin_build}
|
||||
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
|
||||
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
|
||||
|
||||
DESTDIR=
|
||||
prefix:=${DESTDIR}@prefix@
|
||||
|
@ -24,20 +36,12 @@ INSTALL:=@INSTALL@
|
|||
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
||||
INSTALL_DATA:=@INSTALL_DATA@
|
||||
|
||||
CC:=@CC@
|
||||
CC_FOR_TARGET:=$(CC)
|
||||
CXX:=@CXX@
|
||||
CXX_FOR_TARGET:=$(CXX)
|
||||
AR:=@AR@
|
||||
|
||||
include $(srcdir)/../Makefile.common
|
||||
|
||||
CFLAGS:=@CFLAGS@
|
||||
override CXXFLAGS=@CXXFLAGS@
|
||||
override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
||||
|
||||
.SUFFIXES: .c .cc .a .o .d
|
||||
|
||||
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
||||
transport.o transport_pipes.o \
|
||||
bsd_helper.o bsd_log.o bsd_mutex.o \
|
||||
|
@ -78,9 +82,10 @@ $(cygwin_build)/%.o: $(cygwin_source)/%.c
|
|||
@$(MAKE) -C $(@D) $(@F)
|
||||
|
||||
Makefile: Makefile.in configure
|
||||
./config.status
|
||||
|
||||
lib%.o: %.cc
|
||||
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -c -I$(updir)/cygwin -I$(bupdir)/cygwin -o $(@D)/${basename $(@F)}$o $<
|
||||
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE.cc)} -c -o $(@D)/${basename $(@F)}.o $<
|
||||
|
||||
libcygserver.a: $(LIBOBJS)
|
||||
$(AR) crus $@ $?
|
||||
|
|
|
@ -1,875 +1,97 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
||||
# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl This provides configure definitions used by all the winsup
|
||||
dnl This provides configure definitions used by all the cygwin
|
||||
dnl configure.in files.
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC_GNU],
|
||||
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
|
||||
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi])])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
: ${CC:=gcc}
|
||||
AC_PROG_CC
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_HEADERS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-headers],
|
||||
[AS_HELP_STRING([--with-windows-headers=DIR],
|
||||
[specify where the windows includes are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])]
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CXX],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
if test -z "$CXX"; then
|
||||
AC_CHECK_TOOL(CXX, g++, c++, , , )
|
||||
: ${CXX:=g++}
|
||||
AC_PROG_CXX
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_LIBS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-libs],
|
||||
[AS_HELP_STRING([--with-windows-libs=DIR],
|
||||
[specify where the windows libraries are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])]
|
||||
)
|
||||
windows_libdir=$(realdirpath "$with_windows_libs")
|
||||
if test -z "$windows_libdir"; then
|
||||
windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
|
||||
if test -z "$windows_libdir"; then
|
||||
AC_MSG_ERROR([cannot find windows library files])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(windows_libdir)
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFUN([AC_CYGWIN_INCLUDES], [
|
||||
addto_CPPFLAGS -nostdinc
|
||||
: ${ac_cv_prog_CXX:=$CXX}
|
||||
: ${ac_cv_prog_CC:=$CC}
|
||||
|
||||
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
||||
if test -z "$cygwin_headers"; then
|
||||
AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
|
||||
fi
|
||||
|
||||
CXXFLAGS='$(CFLAGS)'
|
||||
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
||||
if test -z "$newlib_headers"; then
|
||||
AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
|
||||
fi
|
||||
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
||||
|
||||
if test -n "$with_windows_headers"; then
|
||||
if test -e "$with_windows_headers/windef.h"; then
|
||||
windows_headers="$with_windows_headers"
|
||||
else
|
||||
AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
|
||||
fi
|
||||
elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
|
||||
windows_headers="$winsup_srcdir/w32api/include"
|
||||
else
|
||||
windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
|
||||
if test -z "$windows_headers" -o ! -d "$windows_headers"; then
|
||||
AC_MSG_ERROR([cannot find windows header files])
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
CXX=$ac_cv_prog_CXX
|
||||
export CC
|
||||
export CXX
|
||||
AC_SUBST(windows_headers)
|
||||
AC_SUBST(newlib_headers)
|
||||
AC_SUBST(cygwin_headers)
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CONFIGURE_ARGS], [
|
||||
configure_args=X
|
||||
for f in $ac_configure_args; do
|
||||
case "$f" in
|
||||
*--srcdir*) ;;
|
||||
*) configure_args="$configure_args $f" ;;
|
||||
esac
|
||||
done
|
||||
configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
|
||||
AC_SUBST(configure_args)
|
||||
])
|
||||
|
||||
AC_SUBST(target_builddir)
|
||||
AC_SUBST(winsup_srcdir)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
/usr/bin/aclocal --acdir=..
|
||||
/usr/bin/autoconf -f
|
||||
exec /bin/rm -rf autom4te.cache
|
File diff suppressed because it is too large
Load Diff
|
@ -11,16 +11,24 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
|
||||
AC_PREREQ(2.59)dnl
|
||||
AC_INIT(cygserver.cc)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
AC_CONFIG_AUX_DIR(../..)
|
||||
. ${srcdir}/../configure.cygwin
|
||||
|
||||
INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c`
|
||||
AC_WINDOWS_HEADERS
|
||||
AC_WINDOWS_LIBS
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_NO_EXECUTABLES
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
LIB_AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
AC_LANG(C)
|
||||
AC_LANG(C++)
|
||||
|
||||
AC_CYGWIN_INCLUDES
|
||||
|
||||
case "$with_cross_host" in
|
||||
""|*cygwin*)
|
||||
|
@ -54,4 +62,5 @@ no) ;;
|
|||
esac
|
||||
])
|
||||
|
||||
AC_CONFIGURE_ARGS
|
||||
AC_OUTPUT(Makefile)
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* select.cc (select): Don't return -1 when we've timed out after
|
||||
looping.
|
||||
|
||||
2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* Makefile.in: Revamp for new configury.
|
||||
(datarootdir): Add variable setting.
|
||||
(winver_stamp): Accommodate changes to mkvers.sh setting.
|
||||
(libc.a): Fix race when libm.a might not have been built yet.
|
||||
* configure.in: Revamp for new configury.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Ditto.
|
||||
* autogen.sh: New script.
|
||||
* mkvers.sh: Find include directives via CFLAGS and friends rather than
|
||||
assuming that w32api lives nearby.
|
||||
|
||||
2012-11-21 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||
|
||||
* termios.cc (cfsetspeed): New function.
|
||||
|
|
|
@ -1,28 +1,35 @@
|
|||
# Makefile.in for Cygwin.
|
||||
# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||
# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
|
||||
#
|
||||
# This file is part of Cygwin.
|
||||
#
|
||||
# This software is a copyrighted work licensed under the terms of the
|
||||
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
# details.
|
||||
# configure_input: @configure_input@
|
||||
|
||||
# This makefile requires GNU make.
|
||||
#
|
||||
# Include common definitions for winsup directory
|
||||
# The following assignments are "inputs" to Makefile.common
|
||||
#
|
||||
CC:=@CC@
|
||||
CC_FOR_TARGET:=$(CC)
|
||||
|
||||
srcdir:=@srcdir@
|
||||
CONFIG_DIR:=$(srcdir)/config/@CONFIG_DIR@
|
||||
target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
export CC:=@CC@
|
||||
export CXX:=@CXX@
|
||||
|
||||
CFLAGS?=@CFLAGS@
|
||||
CXXFLAGS?=@CXXFLAGS@
|
||||
|
||||
include ${srcdir}/../Makefile.common
|
||||
|
||||
SHELL:=@SHELL@
|
||||
objdir:=.
|
||||
# environment variables used by ccwrap
|
||||
export CCWRAP_HEADERS:=. ${srcdir}
|
||||
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
|
||||
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
|
||||
|
||||
VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regex:$(srcdir)/lib:$(srcdir)/libc
|
||||
VPATH+=$(CONFIG_DIR) $(srcdir)/regex $(srcdir)/lib $(srcdir)/libc
|
||||
|
||||
target_alias:=@target_alias@
|
||||
build_alias:=@build_alias@
|
||||
|
@ -35,6 +42,7 @@ bindir:=@bindir@
|
|||
libdir:=@libdir@
|
||||
mandir:=@mandir@
|
||||
sysconfdir:=@sysconfdir@
|
||||
datarootdir:=@datarootdir@
|
||||
ifeq ($(target_alias),$(host_alias))
|
||||
ifeq ($(build_alias),$(host_alias))
|
||||
tooldir:=$(exec_prefix)
|
||||
|
@ -52,17 +60,24 @@ override INSTALL:=@INSTALL@
|
|||
override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
||||
override INSTALL_DATA:=@INSTALL_DATA@
|
||||
|
||||
WINDOWS_LIBDIR:=@windows_libdir@
|
||||
|
||||
cygserver_blddir:=${target_builddir}/winsup/cygserver
|
||||
LIBSERVER:=${cygserver_blddir}/libcygserver.a
|
||||
|
||||
LIBC:=$(newlib_build)/libc/libc.a
|
||||
LIBM:=$(newlib_build)/libm/libm.a
|
||||
CRT0:=$(cygwin_build)/crt0.o
|
||||
|
||||
#
|
||||
# --enable options from configure
|
||||
#
|
||||
MT_SAFE:=@MT_SAFE@
|
||||
DEFS:=@DEFS@
|
||||
CCEXTRA:=
|
||||
CFLAGS?=@CFLAGS@
|
||||
override CFLAGS+=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer \
|
||||
-mno-use-libstdc-wrappers $(CCEXTRA)
|
||||
CXX=@CXX@
|
||||
override CXXFLAGS=@CXXFLAGS@
|
||||
CCEXTRA=
|
||||
COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer $(CCEXTRA)
|
||||
COMPILE.cc+=${COMMON_CFLAGS} -mno-use-libstdc-wrappers
|
||||
COMPILE.c+=${COMMON_CFLAGS}
|
||||
|
||||
AR:=@AR@
|
||||
AR_FLAGS:=qv
|
||||
|
@ -169,6 +184,13 @@ EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
|
|||
spawn.o \
|
||||
)
|
||||
|
||||
ifdef PREPROCESS
|
||||
override DLL_OFILES:=$(patsubst %.o,%_E,${DLL_OFILES})
|
||||
override EXCLUDE_STATIC_OFILES:=$(patsubst %.o,%_E,${EXCLUDE_STATIC_OFILES})
|
||||
override EXTRA_OFILES=$(patsubst %.o,%_E,${DLL_OFILES}))
|
||||
override MALLOC_OFILES:=$(patsubst %.o,%.E,${MALLOC_OFILES})
|
||||
endif #PREPROCESS
|
||||
|
||||
GMON_OFILES:=gmon.o mcount.o profil.o
|
||||
|
||||
NEW_FUNCTIONS:=$(addprefix --replace=,\
|
||||
|
@ -227,7 +249,6 @@ NEW_FUNCTIONS:=$(addprefix --replace=,\
|
|||
API_VER:=$(srcdir)/include/cygwin/version.h
|
||||
|
||||
LIB_NAME:=libcygwin.a
|
||||
LIBSERVER:=@LIBSERVER@
|
||||
SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a
|
||||
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a
|
||||
INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
|
||||
|
@ -299,9 +320,6 @@ cxx_STDINCFLAGS:=yes
|
|||
.PHONY: all force dll_ofiles install all_target install_target all_host install_host \
|
||||
install install-libs install-headers
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cc .def .a .o .d .s
|
||||
|
||||
all_host=@all_host@
|
||||
install_host=@install_host@
|
||||
|
||||
|
@ -386,7 +404,7 @@ uninstall-man:
|
|||
|
||||
clean:
|
||||
-rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc winver_stamp *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h $(srcdir)/tlsoffsets.h $(srcdir)/devices.cc
|
||||
-@$(MAKE) -C $(bupdir)/cygserver libclean
|
||||
-@$(MAKE) -C ${cygserver_blddir} libclean
|
||||
|
||||
maintainer-clean realclean: clean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
@ -396,7 +414,7 @@ maintainer-clean realclean: clean
|
|||
|
||||
# Rule to build cygwin.dll
|
||||
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
|
||||
$(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
|
||||
$(CXX) $(CXXFLAGS) -L${WINDOWS_LIBDIR} -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
|
||||
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
|
||||
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
|
||||
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
|
||||
|
@ -416,8 +434,12 @@ ${STATIC_LIB_NAME}: mkstatic ${TEST_DLL_NAME}
|
|||
$(TEST_LIB_NAME): $(LIB_NAME)
|
||||
perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@
|
||||
|
||||
$(LIBSERVER): $(bupdir)/cygserver/Makefile
|
||||
$(MAKE) -C $(bupdir)/cygserver libcygserver.a
|
||||
$(LIBSERVER): ${cygserver_blddir}/Makefile
|
||||
$(MAKE) -C ${cygserver_blddir} libcygserver.a
|
||||
|
||||
${cygserver_blddir}/Makefile:
|
||||
mkdir -p ${@D}
|
||||
cd ${@D} && exec /bin/sh $(dir ${srcdir})/cygserver/configure ${configure_args}
|
||||
|
||||
dll_ofiles: $(DLL_OFILES)
|
||||
|
||||
|
@ -436,10 +458,10 @@ globals.h: mkglobals_h globals.cc
|
|||
${DLL_OFILES} ${LIBCOS}: globals.h
|
||||
|
||||
shared_info_magic.h: cygmagic shared_info.h
|
||||
/bin/sh $(word 1,$^) $@ "${COMPILE_CXX} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
|
||||
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
|
||||
|
||||
child_info_magic.h: cygmagic child_info.h
|
||||
/bin/sh $(word 1,$^) $@ "${COMPILE_CXX} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
|
||||
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
|
||||
|
||||
dcrt0.o sigproc.o: child_info_magic.h
|
||||
|
||||
|
@ -448,7 +470,7 @@ shared.o: shared_info_magic.h
|
|||
$(srcdir)/devices.cc: gendevices devices.in devices.h
|
||||
${wordlist 1,2,$^} $@
|
||||
|
||||
${CURDIR}/libc.a: ${LIB_NAME} ./libm.a libpthread.a libutil.a
|
||||
${CURDIR}/libc.a: ${LIB_NAME} ${CURDIR}/libm.a libpthread.a libutil.a
|
||||
${speclib} -v ${@F}
|
||||
|
||||
${CURDIR}/libm.a: ${LIB_NAME} $(LIBM)
|
||||
|
@ -474,17 +496,18 @@ ${EXTRALIBS}: lib%.a: %.o
|
|||
|
||||
winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
|
||||
@echo "Making version.o and winver.o";\
|
||||
$(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) && \
|
||||
$(COMPILE_CXX) -c -o version.o version.cc && \
|
||||
/bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} $(addprefix -I,${CCWRAP_SYSTEM_HEADERS} ${CCWRAP_DIRAFTER_HEADERS}) S&& \
|
||||
$(COMPILE.cc) -c -o version.o version.cc && \
|
||||
touch $@
|
||||
|
||||
Makefile: cygwin.din
|
||||
Makefile: cygwin.din ${srcdir}/Makefile.in
|
||||
/bin/sh ./config.status
|
||||
|
||||
$(DEF_FILE): gendef cygwin.din $(srcdir)/tlsoffsets.h
|
||||
$^ $@ sigfe.s
|
||||
|
||||
$(srcdir)/tlsoffsets.h: gentls_offsets cygtls.h
|
||||
$^ $@ $(COMPILE_CXX) -c
|
||||
$^ $@ $(COMPILE.cc) -c
|
||||
|
||||
sigfe.s: $(DEF_FILE)
|
||||
@[ -s $@ ] || \
|
||||
|
@ -494,8 +517,6 @@ sigfe.s: $(DEF_FILE)
|
|||
sigfe.o: sigfe.s
|
||||
$(CC) -c -o $@ $<
|
||||
|
||||
winsup.h: config.h
|
||||
|
||||
ctags: CTAGS
|
||||
tags: CTAGS
|
||||
CTAGS:
|
||||
|
|
|
@ -1,875 +1,97 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
||||
# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl This provides configure definitions used by all the winsup
|
||||
dnl This provides configure definitions used by all the cygwin
|
||||
dnl configure.in files.
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC_GNU],
|
||||
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
|
||||
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi])])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
: ${CC:=gcc}
|
||||
AC_PROG_CC
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_HEADERS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-headers],
|
||||
[AS_HELP_STRING([--with-windows-headers=DIR],
|
||||
[specify where the windows includes are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])]
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CXX],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
if test -z "$CXX"; then
|
||||
AC_CHECK_TOOL(CXX, g++, c++, , , )
|
||||
: ${CXX:=g++}
|
||||
AC_PROG_CXX
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_LIBS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-libs],
|
||||
[AS_HELP_STRING([--with-windows-libs=DIR],
|
||||
[specify where the windows libraries are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])]
|
||||
)
|
||||
windows_libdir=$(realdirpath "$with_windows_libs")
|
||||
if test -z "$windows_libdir"; then
|
||||
windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
|
||||
if test -z "$windows_libdir"; then
|
||||
AC_MSG_ERROR([cannot find windows library files])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(windows_libdir)
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFUN([AC_CYGWIN_INCLUDES], [
|
||||
addto_CPPFLAGS -nostdinc
|
||||
: ${ac_cv_prog_CXX:=$CXX}
|
||||
: ${ac_cv_prog_CC:=$CC}
|
||||
|
||||
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
||||
if test -z "$cygwin_headers"; then
|
||||
AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
|
||||
fi
|
||||
|
||||
CXXFLAGS='$(CFLAGS)'
|
||||
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
||||
if test -z "$newlib_headers"; then
|
||||
AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
|
||||
fi
|
||||
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
||||
|
||||
if test -n "$with_windows_headers"; then
|
||||
if test -e "$with_windows_headers/windef.h"; then
|
||||
windows_headers="$with_windows_headers"
|
||||
else
|
||||
AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
|
||||
fi
|
||||
elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
|
||||
windows_headers="$winsup_srcdir/w32api/include"
|
||||
else
|
||||
windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
|
||||
if test -z "$windows_headers" -o ! -d "$windows_headers"; then
|
||||
AC_MSG_ERROR([cannot find windows header files])
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
CXX=$ac_cv_prog_CXX
|
||||
export CC
|
||||
export CXX
|
||||
AC_SUBST(windows_headers)
|
||||
AC_SUBST(newlib_headers)
|
||||
AC_SUBST(cygwin_headers)
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CONFIGURE_ARGS], [
|
||||
configure_args=X
|
||||
for f in $ac_configure_args; do
|
||||
case "$f" in
|
||||
*--srcdir*) ;;
|
||||
*) configure_args="$configure_args $f" ;;
|
||||
esac
|
||||
done
|
||||
configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
|
||||
AC_SUBST(configure_args)
|
||||
])
|
||||
|
||||
AC_SUBST(target_builddir)
|
||||
AC_SUBST(winsup_srcdir)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
/usr/bin/aclocal --acdir=..
|
||||
/usr/bin/autoconf -f
|
||||
exec /bin/rm -rf autom4te.cache
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +1,23 @@
|
|||
dnl Autoconf configure script for Cygwin.
|
||||
dnl Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
dnl 2008, 2009, 2011 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This file is part of Cygwin.
|
||||
dnl
|
||||
dnl This software is a copyrighted work licensed under the terms of the
|
||||
dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
dnl details.
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)dnl
|
||||
AC_INIT(init.cc)
|
||||
AC_INIT(Makefile.in)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_AUX_DIR(../..)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
. ${srcdir}/../configure.cygwin
|
||||
|
||||
AC_WINDOWS_HEADERS
|
||||
AC_WINDOWS_LIBS
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
LIB_AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
AC_LANG(C)
|
||||
AC_LANG(C++)
|
||||
|
||||
AC_CYGWIN_INCLUDES
|
||||
|
||||
case "$with_cross_host" in
|
||||
""|*cygwin*)
|
||||
|
@ -32,8 +30,6 @@ case "$with_cross_host" in
|
|||
;;
|
||||
esac
|
||||
|
||||
LIBSERVER='$(bupdir)/cygserver/libcygserver.a'
|
||||
|
||||
AC_SUBST(all_host)
|
||||
AC_SUBST(install_host)
|
||||
|
||||
|
@ -83,6 +79,7 @@ case "$target_cpu" in
|
|||
*) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
|
||||
esac
|
||||
|
||||
AC_CONFIGURE_ARGS
|
||||
AC_SUBST(MALLOC_OFILES)
|
||||
AC_SUBST(LIBSERVER)
|
||||
AC_SUBST(DLL_ENTRY)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# mkvers.sh - Make version information for cygwin DLL
|
||||
#
|
||||
# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2010 Red Hat, Inc.
|
||||
# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2010, 2012 Red Hat, Inc.
|
||||
#
|
||||
# This file is part of Cygwin.
|
||||
#
|
||||
|
@ -14,9 +14,23 @@ exec 9> version.cc
|
|||
#
|
||||
# Arg 1 is the name of the version include file
|
||||
#
|
||||
incfile="$1"
|
||||
rcfile="$2"
|
||||
windres="$3"
|
||||
incfile="$1"; shift
|
||||
rcfile="$1"; shift
|
||||
windres="$1"; shift
|
||||
iflags=
|
||||
# Find header file locations
|
||||
while [ -n "$*" ]; do
|
||||
case "$1" in
|
||||
-I*)
|
||||
iflags="$iflags $1"
|
||||
;;
|
||||
-idirafter)
|
||||
shift
|
||||
iflags="$iflags -I$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -r $incfile ] || {
|
||||
echo "**** Couldn't open file '$incfile'. Aborting."
|
||||
|
@ -151,4 +165,4 @@ fi
|
|||
|
||||
echo "Version $cygwin_ver"
|
||||
set -$- $builddate
|
||||
$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
|
||||
$windres $iflags --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#endif
|
||||
|
||||
#include "winsup.h"
|
||||
#include "miscfuncs.h"
|
||||
#include "cygerrno.h"
|
||||
|
|
|
@ -208,7 +208,7 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
if (now > (start_time + ms))
|
||||
{
|
||||
select_printf ("timed out after verification");
|
||||
res = select_stuff::select_error;
|
||||
res = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -9,9 +9,7 @@ This software is a copyrighted work licensed under the terms of the
|
|||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#define __INSIDE_CYGWIN__
|
||||
|
||||
|
|
|
@ -0,0 +1,520 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # 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.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# 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_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
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
|
||||
no_target_directory=
|
||||
|
||||
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
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
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
|
||||
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
|
||||
trap '(exit $?); exit' 1 2 13 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 starting with `-'.
|
||||
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
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# 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 -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
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-writeable 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
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && 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` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob 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: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1,3 +1,29 @@
|
|||
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Ditto.
|
||||
* autogen.sh: New script.
|
||||
* configure.in: Revamp for new configury.
|
||||
* Makefile.in: Revamp for new configury. Rename ALL_* to just *.
|
||||
Always use "VERBOSE" setting.
|
||||
(MINGW_CXX): Don't include CFLAGS in definition.
|
||||
(all): Define target first, before everything else so that it is the
|
||||
default.
|
||||
(ps.exe): Don't add useless -lcygwin.
|
||||
(ldh.exe): For consistency, add to existing MINGW_LDFLAGS rather than
|
||||
redefining them.
|
||||
(cygcheck.exe): Always include -lz for MINGW_LDFLAGS. Don't try to
|
||||
figure out where to find it.
|
||||
(dumper.exe): Simplify check. Assume libraries are installed rather
|
||||
than trying to retrieve from source tree.
|
||||
(install): Just use /bin/mkdir to create directories.
|
||||
(Makefile): Regenerate when standard dependencies change.
|
||||
* dump_setup.cc: Always include zlib.h. Remove accommodations for it
|
||||
possibly not existing.
|
||||
* parse_pe.cc: Add define which allows building with installed
|
||||
binutils package.
|
||||
* dumper.cc: Ditto.
|
||||
|
||||
2012-11-09 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (vcygpath): Handle cygdrive prefix.
|
||||
|
|
|
@ -8,10 +8,27 @@
|
|||
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
# details.
|
||||
|
||||
SHELL:=@SHELL@
|
||||
|
||||
srcdir:=@srcdir@
|
||||
VPATH:=@srcdir@
|
||||
target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
export CC:=@CC@
|
||||
export CXX:=@CXX@
|
||||
|
||||
include ${srcdir}/../Makefile.common
|
||||
|
||||
cygwin_build:=${target_builddir}/winsup/cygwin
|
||||
|
||||
cygwin_headers:=@cygwin_headers@
|
||||
|
||||
# environment variables used by ccwrap
|
||||
export CCWRAP_HEADERS:=. ${srcdir} $(call justdir,${cygwin_headers})
|
||||
export CCWRAP_SYSTEM_HEADERS:=${cygwin_headers} @newlib_headers@
|
||||
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
|
||||
|
||||
WINDOWS_LIBDIR:=@windows_libdir@
|
||||
|
||||
prefix:=@prefix@
|
||||
exec_prefix:=@exec_prefix@
|
||||
|
||||
|
@ -25,26 +42,17 @@ override INSTALL_DATA:=@INSTALL_DATA@
|
|||
EXEEXT:=@EXEEXT@
|
||||
EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@
|
||||
|
||||
CC:=@CC@
|
||||
CC_FOR_TARGET:=$(CC)
|
||||
CXX:=@CXX@
|
||||
CXX_FOR_TARGET:=$(CXX)
|
||||
|
||||
CFLAGS:=@CFLAGS@
|
||||
CXXFLAGS:=@CXXFLAGS@
|
||||
override CXXFLAGS+=-fno-exceptions -fno-rtti -DHAVE_DECL_GETOPT=0
|
||||
|
||||
include $(srcdir)/../Makefile.common
|
||||
|
||||
.SUFFIXES:
|
||||
.NOEXPORT:
|
||||
.PHONY: all install clean realclean warn_dumper warn_cygcheck_zlib
|
||||
|
||||
ALL_LDLIBS := -lnetapi32 -ladvapi32 -lkernel32 -luser32
|
||||
ALL_LDFLAGS := -static-libgcc -Wl,--enable-auto-import -B$(newlib_build)/libc $(LDFLAGS) $(ALL_LDLIBS)
|
||||
ALL_DEP_LDLIBS := $(cygwin_build)/libcygwin.a
|
||||
LDLIBS := -lnetapi32 -ladvapi32 -lkernel32 -luser32
|
||||
CYGWIN_LDFLAGS := -static-libgcc -Wl,--enable-auto-import -L${WINDOWS_LIBDIR} $(LDLIBS)
|
||||
DEP_LDLIBS := $(cygwin_build)/libcygwin.a
|
||||
|
||||
MINGW_CXX := @MINGW_CXX@ $(CFLAGS)
|
||||
MINGW_CXX := @MINGW_CXX@
|
||||
|
||||
# List all binaries to be linked in Cygwin mode. Each binary on this list
|
||||
# must have a corresponding .o of the same name.
|
||||
|
@ -59,56 +67,51 @@ MINGW_BINS := ${addsuffix .exe,cygcheck cygwin-console-helper ldh strace}
|
|||
# list will will be compiled in Cygwin mode implicitly, so there is no
|
||||
# need for a CYGWIN_OBJS.
|
||||
MINGW_OBJS := bloda.o cygcheck.o dump_setup.o ldh.o path.o strace.o
|
||||
MINGW_LDFLAGS:=-L${WINDOWS_LIBDIR}
|
||||
|
||||
CYGCHECK_OBJS:=cygcheck.o bloda.o path.o dump_setup.o
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
|
||||
# If a binary should link in any objects besides the .o with the same
|
||||
# name as the binary, then list those here.
|
||||
strace.exe: path.o
|
||||
cygcheck.exe: bloda.o path.o dump_setup.o
|
||||
cygcheck.exe: cygcheck.o bloda.o path.o dump_setup.o
|
||||
|
||||
path-mount.o: path.cc
|
||||
$(CXX) -c $(CXXFLAGS) -DFSTAB_ONLY -I$(updir) $< -o $@
|
||||
${COMPILE.cc} -c -DFSTAB_ONLY -o $@ $<
|
||||
mount.exe: path-mount.o
|
||||
|
||||
# Provide any necessary per-target variable overrides.
|
||||
cygcheck.exe: MINGW_CXXFLAGS += -idirafter $(cygwin_source)/include -idirafter $(newlib_source)/libc/include
|
||||
cygcheck.exe: MINGW_LDFLAGS += -lpsapi -lntdll
|
||||
cygpath.exe: ALL_LDFLAGS += -lcygwin -luserenv -lntdll
|
||||
cygpath.exe: CXXFLAGS += -fno-threadsafe-statics
|
||||
ps.exe: ALL_LDFLAGS += -lcygwin -lpsapi -lntdll
|
||||
|
||||
cygcheck.exe: MINGW_LDFLAGS += -lpsapi -lntdll -lz
|
||||
cygcheck.exe: ${CYGCHECK_OBJS}
|
||||
|
||||
cygpath.o: CXXFLAGS += -fno-threadsafe-statics
|
||||
cygpath.exe: CYGWIN_LDFLAGS += -luserenv -lntdll
|
||||
ps.exe: CYGWIN_LDFLAGS += -lpsapi -lntdll
|
||||
strace.exe: MINGW_LDFLAGS += -lntdll
|
||||
|
||||
ldd.exe: ALL_LDFLAGS += -lpsapi
|
||||
pldd.exe: ALL_LDFLAGS += -lpsapi
|
||||
ldd.exe:CYGWIN_LDFLAGS += -lpsapi
|
||||
pldd.exe: CYGWIN_LDFLAGS += -lpsapi
|
||||
|
||||
ldh.exe: MINGW_LDFLAGS := -nostdlib -lkernel32
|
||||
ldh.exe: MINGW_LDFLAGS += -nostdlib -lkernel32
|
||||
|
||||
# Check for dumper's requirements and enable it if found.
|
||||
libiconv := ${shell $(CC) --print-file-name=libiconv.a}
|
||||
libbfd := ${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a}
|
||||
libintl := ${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a}
|
||||
bfdlink := $(shell ${CC} -xc /dev/null -o /dev/null -c -B${bupdir2}/bfd/ -include bfd.h 2>&1)
|
||||
build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(libiconv)" -a -z "${bfdlink}" && echo 1}
|
||||
libbfd := $(call libname,libbfd.a)
|
||||
build_dumper := $(shell test -r "$(libbfd)" && echo 1)
|
||||
|
||||
ifdef build_dumper
|
||||
CYGWIN_BINS += dumper.exe
|
||||
dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(bupdir2)/bfd -I$(updir1)/include
|
||||
dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(top_srcdir)/include
|
||||
dumper.o parse_pe.o: dumper.h
|
||||
dumper.exe: module_info.o parse_pe.o
|
||||
dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(libiconv) -liberty -lz
|
||||
dumper.exe: CYGWIN_LDFLAGS += -lbfd -lintl -liconv -liberty -lz
|
||||
else
|
||||
all: warn_dumper
|
||||
endif
|
||||
|
||||
# Check for availability of a MinGW libz and enable for cygcheck.
|
||||
libz:=${shell x=$$(${MINGW_CXX} --print-file-name=libz.a); cd $$(dirname $$x); dir=$$(pwd); case "$$dir" in *mingw*) echo $$dir/libz.a ;; esac}
|
||||
ifdef libz
|
||||
zlib_h := -include ${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}
|
||||
zconf_h := ${patsubst %/zlib.h,%/zconf.h,$(zlib_h)}
|
||||
dump_setup.o: MINGW_CXXFLAGS += $(zconf_h) $(zlib_h)
|
||||
cygcheck.exe: MINGW_LDFLAGS += $(libz)
|
||||
else
|
||||
all: warn_cygcheck_zlib
|
||||
endif
|
||||
|
||||
all: Makefile $(CYGWIN_BINS) $(MINGW_BINS)
|
||||
|
||||
# test harness support (note: the "MINGW_BINS +=" should come after the
|
||||
|
@ -127,46 +130,38 @@ check: testsuite.exe ; $(<D)/$(<F)
|
|||
# the rest of this file contains generic rules
|
||||
|
||||
# how to compile a MinGW object
|
||||
${MINGW_OBJS}: override CXX:=${MINGW_CXX}
|
||||
${MINGW_OBJS}: CCWRAP_HEADERS:=${srcdir}
|
||||
${MINGW_OBJS}: CCWRAP_SYSTEM_HEADERS:=
|
||||
# ${MINGW_OBJS}: CCWRAP_DIRAFTER_HEADERS:=
|
||||
$(MINGW_OBJS): %.o: %.cc
|
||||
ifdef VERBOSE
|
||||
$(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||
else
|
||||
@echo $(MINGW_CXX) $c $(MINGW_CXXFLAGS) ... $(*F).cc;\
|
||||
$(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||
endif
|
||||
c++wrap -c -o $@ ${CXXFLAGS} $(MINGW_CXXFLAGS) $<
|
||||
|
||||
# how to link a MinGW binary
|
||||
$(MINGW_BINS): %.exe: %.o
|
||||
ifdef VERBOSE
|
||||
$(MINGW_CXX) $(MINGW_CXXFLAGS) -o $@ ${filter %.o,$^} $(MINGW_LDFLAGS)
|
||||
else
|
||||
@echo $(MINGW_CXX) -o $@ ${filter %.o,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\
|
||||
$(MINGW_CXX) $(MINGW_CXXFLAGS) -o $@ ${filter %.o,$^} $(MINGW_LDFLAGS)
|
||||
endif
|
||||
|
||||
# how to link a Cygwin binary
|
||||
$(CYGWIN_BINS): %.exe: %.o
|
||||
ifdef VERBOSE
|
||||
$(CXX) -o $@ ${filter %.o,$^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
|
||||
else
|
||||
@echo $(CXX) -o $@ ${filter %.o,$^} ... ${filter-out -B%, $(ALL_LDFLAGS)};\
|
||||
$(CXX) -o $@ ${filter %.o,$^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
|
||||
endif
|
||||
${CXX} -o $@ $(filter %.o,$^) -B${cygwin_build}/ ${LDFLAGS} ${CYGWIN_LDFLAGS}
|
||||
|
||||
# note: how to compile a Cygwin object is covered by the pattern rule in Makefile.common
|
||||
|
||||
# these dependencies ensure that the required in-tree libs are built first
|
||||
$(MINGW_BINS): $(ALL_DEP_LDLIBS)
|
||||
$(CYGWIN_BINS): $(ALL_DEP_LDLIBS)
|
||||
$(MINGW_BINS): $(DEP_LDLIBS)
|
||||
$(CYGWIN_BINS): $(DEP_LDLIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.o $(CYGWIN_BINS) $(MINGW_BINS) path-testsuite.cc testsuite.exe
|
||||
|
||||
.PHONY: realclean
|
||||
realclean: clean
|
||||
rm -f Makefile config.cache
|
||||
|
||||
.PHONY: install
|
||||
install: all
|
||||
$(SHELL) $(updir1)/mkinstalldirs $(DESTDIR)$(bindir)
|
||||
/bin/mkdir -p ${DESTDIR}${bindir}
|
||||
for i in $(CYGWIN_BINS) ${filter-out testsuite.exe,$(MINGW_BINS)} ; do \
|
||||
n=`echo $$i | sed '$(program_transform_name)'`; \
|
||||
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$n; \
|
||||
|
@ -175,6 +170,7 @@ install: all
|
|||
$(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile
|
||||
@$(MAKE) -C $(@D) $(@F)
|
||||
|
||||
.PHONY: warn_dumper
|
||||
warn_dumper:
|
||||
@echo '*** Not building dumper.exe since some required libraries or'
|
||||
@echo '*** or headers are missing. Potential candidates are:'
|
||||
|
@ -183,5 +179,5 @@ warn_dumper:
|
|||
@echo '*** sources from sourceware.org. Then, configure and build these'
|
||||
@echo '*** libraries. Otherwise, you can safely ignore this warning.'
|
||||
|
||||
warn_cygcheck_zlib:
|
||||
@echo '*** Building cygcheck without package content checking due to missing mingw libz.a.'
|
||||
Makefile: Makefile.in config.status
|
||||
/bin/sh ./config.status
|
||||
|
|
|
@ -1,875 +1,97 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
||||
# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl This provides configure definitions used by all the winsup
|
||||
dnl This provides configure definitions used by all the cygwin
|
||||
dnl configure.in files.
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC_GNU],
|
||||
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
|
||||
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi])])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CC],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
: ${CC:=gcc}
|
||||
AC_PROG_CC
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_HEADERS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-headers],
|
||||
[AS_HELP_STRING([--with-windows-headers=DIR],
|
||||
[specify where the windows includes are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])]
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([LIB_AC_PROG_CXX],
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
if test -z "$CXX"; then
|
||||
AC_CHECK_TOOL(CXX, g++, c++, , , )
|
||||
: ${CXX:=g++}
|
||||
AC_PROG_CXX
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
AC_DEFUN([AC_WINDOWS_LIBS],[
|
||||
AC_ARG_WITH(
|
||||
[windows-libs],
|
||||
[AS_HELP_STRING([--with-windows-libs=DIR],
|
||||
[specify where the windows libraries are located])],
|
||||
[test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])]
|
||||
)
|
||||
windows_libdir=$(realdirpath "$with_windows_libs")
|
||||
if test -z "$windows_libdir"; then
|
||||
windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
|
||||
if test -z "$windows_libdir"; then
|
||||
AC_MSG_ERROR([cannot find windows library files])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(windows_libdir)
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFUN([AC_CYGWIN_INCLUDES], [
|
||||
addto_CPPFLAGS -nostdinc
|
||||
: ${ac_cv_prog_CXX:=$CXX}
|
||||
: ${ac_cv_prog_CC:=$CC}
|
||||
|
||||
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
||||
if test -z "$cygwin_headers"; then
|
||||
AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
|
||||
fi
|
||||
|
||||
CXXFLAGS='$(CFLAGS)'
|
||||
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
||||
if test -z "$newlib_headers"; then
|
||||
AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
|
||||
fi
|
||||
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
||||
|
||||
if test -n "$with_windows_headers"; then
|
||||
if test -e "$with_windows_headers/windef.h"; then
|
||||
windows_headers="$with_windows_headers"
|
||||
else
|
||||
AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
|
||||
fi
|
||||
elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
|
||||
windows_headers="$winsup_srcdir/w32api/include"
|
||||
else
|
||||
windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
|
||||
if test -z "$windows_headers" -o ! -d "$windows_headers"; then
|
||||
AC_MSG_ERROR([cannot find windows header files])
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
CXX=$ac_cv_prog_CXX
|
||||
export CC
|
||||
export CXX
|
||||
AC_SUBST(windows_headers)
|
||||
AC_SUBST(newlib_headers)
|
||||
AC_SUBST(cygwin_headers)
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CONFIGURE_ARGS], [
|
||||
configure_args=X
|
||||
for f in $ac_configure_args; do
|
||||
case "$f" in
|
||||
*--srcdir*) ;;
|
||||
*) configure_args="$configure_args $f" ;;
|
||||
esac
|
||||
done
|
||||
configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
|
||||
AC_SUBST(configure_args)
|
||||
])
|
||||
|
||||
AC_SUBST(target_builddir)
|
||||
AC_SUBST(winsup_srcdir)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
/usr/bin/aclocal --acdir=..
|
||||
/usr/bin/autoconf -f
|
||||
exec /bin/rm -rf autom4te.cache
|
|
@ -1,11 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68.
|
||||
# Generated by GNU Autoconf 2.69.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
|
@ -134,6 +132,31 @@ export LANGUAGE
|
|||
# CDPATH.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
# Use a proper internal environment variable to ensure we don't fall
|
||||
# into an infinite loop, continuously re-executing ourselves.
|
||||
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
|
||||
_as_can_reexec=no; export _as_can_reexec;
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
as_fn_exit 255
|
||||
fi
|
||||
# We don't want this to propagate to other subprocesses.
|
||||
{ _as_can_reexec=; unset _as_can_reexec;}
|
||||
if test "x$CONFIG_SHELL" = x; then
|
||||
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
|
||||
emulate sh
|
||||
|
@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
|
|||
else
|
||||
exitcode=1; echo positional parameters were not saved.
|
||||
fi
|
||||
test x\$exitcode = x0 || exit 1"
|
||||
test x\$exitcode = x0 || exit 1
|
||||
test -x / || exit 1"
|
||||
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
|
||||
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
|
||||
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
|
||||
|
@ -211,21 +235,25 @@ IFS=$as_save_IFS
|
|||
|
||||
|
||||
if test "x$CONFIG_SHELL" != x; then :
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
export CONFIG_SHELL
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
|
||||
export CONFIG_SHELL
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if test x$as_have_required = xno; then :
|
||||
|
@ -327,6 +355,14 @@ $as_echo X"$as_dir" |
|
|||
|
||||
|
||||
} # as_fn_mkdir_p
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
# as_fn_append VAR VALUE
|
||||
# ----------------------
|
||||
# Append the text in VALUE to the end of the definition contained in VAR. Take
|
||||
|
@ -448,6 +484,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
|
|||
chmod +x "$as_me.lineno" ||
|
||||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
|
||||
|
||||
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
|
||||
# already done that, so ensure we don't try to do so again and fall
|
||||
# in an infinite loop. This has already happened in practice.
|
||||
_as_can_reexec=no; export _as_can_reexec
|
||||
# Don't try to exec as it changes $[0], causing all sort of problems
|
||||
# (the dirname of $[0] is not the place where we might find the
|
||||
# original and so on. Autoconf is especially sensitive to this).
|
||||
|
@ -482,16 +522,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
|||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
|
@ -503,28 +543,8 @@ else
|
|||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
|
@ -565,10 +585,14 @@ ac_unique_file="mount.cc"
|
|||
ac_no_link=no
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
configure_args
|
||||
MINGW_CXX
|
||||
INSTALL_DATA
|
||||
INSTALL_SCRIPT
|
||||
INSTALL_PROGRAM
|
||||
cygwin_headers
|
||||
newlib_headers
|
||||
windows_headers
|
||||
ac_ct_CXX
|
||||
CXXFLAGS
|
||||
CXX
|
||||
|
@ -591,6 +615,7 @@ build_os
|
|||
build_vendor
|
||||
build_cpu
|
||||
build
|
||||
windows_libdir
|
||||
target_alias
|
||||
host_alias
|
||||
build_alias
|
||||
|
@ -628,10 +653,14 @@ PACKAGE_VERSION
|
|||
PACKAGE_TARNAME
|
||||
PACKAGE_NAME
|
||||
PATH_SEPARATOR
|
||||
SHELL'
|
||||
SHELL
|
||||
winsup_srcdir
|
||||
target_builddir'
|
||||
ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
with_windows_headers
|
||||
with_windows_libs
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -1099,8 +1128,6 @@ target=$target_alias
|
|||
if test "x$host_alias" != x; then
|
||||
if test "x$build_alias" = x; then
|
||||
cross_compiling=maybe
|
||||
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
|
||||
If a cross compiler is detected then cross compile mode will be used" >&2
|
||||
elif test "x$build_alias" != "x$host_alias"; then
|
||||
cross_compiling=yes
|
||||
fi
|
||||
|
@ -1259,6 +1286,13 @@ if test -n "$ac_init_help"; then
|
|||
|
||||
cat <<\_ACEOF
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-windows-headers=DIR
|
||||
specify where the windows includes are located
|
||||
--with-windows-libs=DIR specify where the windows libraries are located
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
|
@ -1337,9 +1371,9 @@ test -n "$ac_init_help" && exit $ac_status
|
|||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
configure
|
||||
generated by GNU Autoconf 2.68
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.
|
||||
_ACEOF
|
||||
|
@ -1430,7 +1464,7 @@ This file contains any messages produced by compilers while
|
|||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
|
@ -1808,6 +1842,37 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
|||
|
||||
|
||||
|
||||
|
||||
. ${srcdir}/../configure.cygwin
|
||||
|
||||
|
||||
|
||||
# Check whether --with-windows-headers was given.
|
||||
if test "${with_windows_headers+set}" = set; then :
|
||||
withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-windows-libs was given.
|
||||
if test "${with_windows_libs+set}" = set; then :
|
||||
withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
windows_libdir=$(realdirpath "$with_windows_libs")
|
||||
if test -z "$windows_libdir"; then
|
||||
windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
|
||||
if test -z "$windows_libdir"; then
|
||||
as_fn_error $? "cannot find windows library files" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||
|
@ -1920,99 +1985,6 @@ test -n "$target_alias" &&
|
|||
program_prefix=${target_alias}-
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
if test -n "$CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
|
||||
$as_echo "$CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_CC"; then
|
||||
ac_ct_CC=$CC
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_CC"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_CC="gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_CC=$ac_cv_prog_ac_ct_CC
|
||||
if test -n "$ac_ct_CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
|
||||
$as_echo "$ac_ct_CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_CC" = x; then
|
||||
CC="gcc"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
CC=$ac_ct_CC
|
||||
fi
|
||||
else
|
||||
CC="$ac_cv_prog_CC"
|
||||
fi
|
||||
|
||||
: ${CC:=gcc}
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -2035,7 +2007,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -2075,7 +2047,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -2128,7 +2100,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}cc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -2169,7 +2141,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
|
@ -2227,7 +2199,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -2271,7 +2243,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -2793,8 +2765,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
struct stat;
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
|
@ -2879,195 +2850,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}g++; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CXX+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CXX"; then
|
||||
ac_cv_prog_CXX="$CXX" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_CXX="${ac_tool_prefix}g++"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CXX=$ac_cv_prog_CXX
|
||||
if test -n "$CXX"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
|
||||
$as_echo "$CXX" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_CXX"; then
|
||||
ac_ct_CXX=$CXX
|
||||
# Extract the first word of "g++", so it can be a program name with args.
|
||||
set dummy g++; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_CXX"; then
|
||||
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_CXX="g++"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
|
||||
if test -n "$ac_ct_CXX"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
|
||||
$as_echo "$ac_ct_CXX" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_CXX" = x; then
|
||||
CXX="g++"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
CXX=$ac_ct_CXX
|
||||
fi
|
||||
else
|
||||
CXX="$ac_cv_prog_CXX"
|
||||
fi
|
||||
|
||||
if test -z "$CXX"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}g++; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CXX+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CXX"; then
|
||||
ac_cv_prog_CXX="$CXX" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_CXX="${ac_tool_prefix}g++"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CXX=$ac_cv_prog_CXX
|
||||
if test -n "$CXX"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
|
||||
$as_echo "$CXX" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_CXX"; then
|
||||
ac_ct_CXX=$CXX
|
||||
# Extract the first word of "g++", so it can be a program name with args.
|
||||
set dummy g++; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_CXX"; then
|
||||
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_CXX="g++"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
|
||||
if test -n "$ac_ct_CXX"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
|
||||
$as_echo "$ac_ct_CXX" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_CXX" = x; then
|
||||
CXX="c++"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
CXX=$ac_ct_CXX
|
||||
fi
|
||||
else
|
||||
CXX="$ac_cv_prog_CXX"
|
||||
fi
|
||||
|
||||
: ${CXX:=g++}
|
||||
ac_ext=cpp
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
|
@ -3095,7 +2878,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -3139,7 +2922,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CXX="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -3324,10 +3107,44 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
|
||||
|
||||
|
||||
addto_CPPFLAGS -nostdinc
|
||||
: ${ac_cv_prog_CXX:=$CXX}
|
||||
: ${ac_cv_prog_CC:=$CC}
|
||||
|
||||
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
||||
if test -z "$cygwin_headers"; then
|
||||
as_fn_error $? "cannot find $winsup_srcdir/cygwin/include directory" "$LINENO" 5
|
||||
fi
|
||||
|
||||
CXXFLAGS='$(CFLAGS)'
|
||||
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
||||
if test -z "$newlib_headers"; then
|
||||
as_fn_error $? "cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include" "$LINENO" 5
|
||||
fi
|
||||
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
||||
|
||||
if test -n "$with_windows_headers"; then
|
||||
if test -e "$with_windows_headers/windef.h"; then
|
||||
windows_headers="$with_windows_headers"
|
||||
else
|
||||
as_fn_error $? "cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers" "$LINENO" 5;
|
||||
fi
|
||||
elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
|
||||
windows_headers="$winsup_srcdir/w32api/include"
|
||||
else
|
||||
windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
|
||||
if test -z "$windows_headers" -o ! -d "$windows_headers"; then
|
||||
as_fn_error $? "cannot find windows header files" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
CXX=$ac_cv_prog_CXX
|
||||
export CC
|
||||
export CXX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
test "$program_prefix" != NONE &&
|
||||
|
@ -3341,8 +3158,6 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
|
|||
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
|
||||
|
||||
|
||||
INSTALL="/bin/sh "`cd $srcdir/../..; echo $(pwd)/install-sh -c`
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
# incompatible versions:
|
||||
|
@ -3380,7 +3195,7 @@ case $as_dir/ in #((
|
|||
# by default.
|
||||
for ac_prog in ginstall scoinst install; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
|
||||
if test $ac_prog = install &&
|
||||
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
|
||||
# AIX install. It has an incompatible calling convention.
|
||||
|
@ -3455,7 +3270,7 @@ do
|
|||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_MINGW_CXX="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
|
@ -3479,7 +3294,18 @@ fi
|
|||
test -n "$MINGW_CXX" && break
|
||||
done
|
||||
|
||||
test -z "$MINGW_CXX" && as_fn_error $? "no acceptable mingw g++ found in \$PATH" "$LINENO" 5
|
||||
test -n "$MINGW_CXX" || as_fn_error $? "no acceptable mingw g++ found in \$PATH" "$LINENO" 5
|
||||
|
||||
|
||||
|
||||
configure_args=X
|
||||
for f in $ac_configure_args; do
|
||||
case "$f" in
|
||||
*--srcdir*) ;;
|
||||
*) configure_args="$configure_args $f" ;;
|
||||
esac
|
||||
done
|
||||
configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
@ -3927,16 +3753,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
|||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
|
@ -3996,28 +3822,16 @@ else
|
|||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
|
@ -4039,7 +3853,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
|
@ -4092,10 +3906,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
|||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
config.status
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
|
@ -4173,7 +3987,7 @@ fi
|
|||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
if \$ac_cs_recheck; then
|
||||
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
shift
|
||||
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
|
||||
CONFIG_SHELL='$SHELL'
|
||||
|
|
|
@ -14,19 +14,26 @@ AC_INIT(mount.cc)
|
|||
AC_CONFIG_AUX_DIR(../..)
|
||||
|
||||
AC_NO_EXECUTABLES
|
||||
|
||||
. ${srcdir}/../configure.cygwin
|
||||
|
||||
AC_WINDOWS_HEADERS
|
||||
AC_WINDOWS_LIBS
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
LIB_AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
AC_CYGWIN_INCLUDES
|
||||
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
INSTALL="/bin/sh "`cd $srcdir/../..; echo $(pwd)/install-sh -c`
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++)
|
||||
test -z "$MINGW_CXX" && AC_MSG_ERROR([no acceptable mingw g++ found in \$PATH])
|
||||
test -n "$MINGW_CXX" || AC_MSG_ERROR([no acceptable mingw g++ found in \$PATH])
|
||||
|
||||
AC_EXEEXT
|
||||
AC_CONFIGURE_ARGS
|
||||
AC_OUTPUT(Makefile)
|
||||
|
|
|
@ -28,15 +28,7 @@ details. */
|
|||
# include <ntstatus.h>
|
||||
#endif
|
||||
#include "path.h"
|
||||
#if 0
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
|
||||
#ifndef ZLIB_VERSION
|
||||
typedef void * gzFile;
|
||||
#define gzgets(fp, buf, size) ({0;})
|
||||
#define gzclose(fp) ({0;})
|
||||
#endif
|
||||
#include <zlib.h>
|
||||
|
||||
static int package_len = 20;
|
||||
static unsigned int version_len = 10;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#define PACKAGE
|
||||
#include <bfd.h>
|
||||
#include <elf/common.h>
|
||||
#include <elf/external.h>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define PACKAGE
|
||||
#include <bfd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -13,9 +13,9 @@ details. */
|
|||
|
||||
#include <windows.h>
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
#include "ddk/ntapi.h"
|
||||
# include "ddk/ntapi.h"
|
||||
#else
|
||||
#include <winternl.h>
|
||||
# include <winternl.h>
|
||||
#endif
|
||||
#define cygwin_internal cygwin_internal_dontuse
|
||||
#include <stdio.h>
|
||||
|
|
Loading…
Reference in New Issue