Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-11-23 17:22:47 +0400
committerChristopher Faylor <me@cgf.cx>2012-11-23 17:22:47 +0400
commit4c36016b570670b75fa2f9f396fb297a04fd09bd (patch)
tree1708c166aba9c96b9e57be0d894a7bd46268e54d /winsup/acinclude.m4
parent1cfd36169ccdb79e115c3a9fa4c5fa2e1372ba27 (diff)
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.
Diffstat (limited to 'winsup/acinclude.m4')
-rw-r--r--winsup/acinclude.m4112
1 files changed, 76 insertions, 36 deletions
diff --git a/winsup/acinclude.m4 b/winsup/acinclude.m4
index 4e2db0768..80c920e8c 100644
--- a/winsup/acinclude.m4
+++ b/winsup/acinclude.m4
@@ -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
+
+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"
-CXXFLAGS='$(CFLAGS)'
+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)