From e9b171e0738c2acef0650328b7f2e1ae7cdc55cc Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 21 Nov 2003 18:27:14 +0000 Subject: Numerous build fixes from an oemake -a run, including two more fixes for libtool 'libdir from .la file leaking into library search path' situations. BKrev: 3fbe5902eywlLRHkRQ1FaDS5C01-jg --- alsa-tools/alsa-tools_0.9.8.oe | 0 alsa-utils/alsa-utils_0.9.8.oe | 8 + binutils/binutils_2.14.90.0.6.oe | 4 + bison/bison-1.875/m4.patch | 0 bison/bison_1.875.oe | 7 + bluez-hcidump/bluez-hcidump-1.5/configure.patch | 29 + bluez-hcidump/bluez-hcidump_1.5.oe | 13 + bluez-libs/bluez-libs_2.4.oe | 3 +- bluez-sdp/bluez-sdp_1.5.oe | 30 + bluez-utils/bluez-utils-2.3/configure.patch | 0 bluez-utils/bluez-utils_2.3.oe | 12 + centericq/centericq-4.9.7/m4.patch | 0 centericq/centericq_4.9.7.oe | 10 + e2fsprogs-libs/e2fsprogs-libs-1.34/ldflags.patch | 0 e2fsprogs-libs/e2fsprogs-libs-1.34/m4.patch | 0 e2fsprogs-libs/e2fsprogs-libs_1.34.oe | 6 +- e2fsprogs/e2fsprogs-1.34/e2fsprogs_1.34.oe | 0 e2fsprogs/e2fsprogs-1.34/ldflags.patch | 0 e2fsprogs/e2fsprogs-1.34/m4.patch | 0 e2fsprogs/e2fsprogs_1.34.oe | 21 + fakeroot/fakeroot-native_0.7.8.oe | 5 + findutils/findutils-4.1.20/m4.patch | 0 findutils/findutils_4.1.20.oe | 3 +- gcc/gcc-cross_3.3.2.oe | 54 + glibc/glibc_2.3.2.oe | 27 +- jpeg/jpeg-6b/ldflags.patch | 0 jpeg/jpeg_6b.oe | 33 + liblockfile/liblockfile-1.05/ldflags.patch | 0 liblockfile/liblockfile_1.05.oe | 5 +- libpcap/libpcap-0.7.2/ldflags.patch | 0 libpcap/libpcap_0.7.2.oe | 1 + libtool/libtool-1.5/libdir-la.patch | 62 + libtool/libtool-cross_1.5.oe | 2 +- lisa/lisa_0.2.2.oe | 6 +- nmap/nmap_3.45.oe | 46 + nonworking/alsa-tools/alsa-tools_0.9.8.oe | 0 nonworking/python/python-2.3.2/bindir-libdir.patch | 0 nonworking/python/python-native_2.3.2.oe | 0 nonworking/python/python_2.3.2.oe | 0 .../vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch | 0 nonworking/vpnc/vpnc_0.2-rm+zomb-pre6.oe | 0 .../dirty-3.2-xterm-breakage-fix.patch | 0 nonworking/xfree86/xfree86-4.3.0/host.def | 0 .../xfree86-4.3.0/tinyx-kbd-enable-fix.patch | 0 .../tinyx-tslib-reset-and-vt-switch-fixes.patch | 0 nonworking/xfree86/xfree86_4.3.0.oe | 0 openssh/openssh-3.7.1p1/configure.patch | 23706 +++++++++++++++++++ openssl/openssl_0.9.7b.oe | 45 + openssl/openssl_0.9.7c.oe | 17 +- python/python-2.3.2/bindir-libdir.patch | 0 python/python-native_2.3.2.oe | 11 - python/python_2.3.2.oe | 16 - qte/qte_2.3.6.oe | 68 + randr/randr-cvs.oe | 19 + render/render-cvs.oe | 19 + resolvconf/resolvconf_0.41.oe | 0 resolvconf/resolvconf_1.0.oe | 0 resolvconf/resolvconf_1.2.oe | 0 resourceext/resourceext-cvs.oe | 19 + udev/udev_006.oe | 0 vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch | 0 vpnc/vpnc_0.2-rm+zomb-pre6.oe | 13 - xau/xau-cvs.oe | 16 + xdmcp/xdmcp-cvs.oe | 9 +- xextensions/xextensions-cvs.oe | 19 + xfont/xfont-cvs.oe | 19 + .../dirty-3.2-xterm-breakage-fix.patch | 0 xfree86/xfree86-4.3.0/host.def | 0 xfree86/xfree86-4.3.0/tinyx-kbd-enable-fix.patch | 0 .../tinyx-tslib-reset-and-vt-switch-fixes.patch | 0 xfree86/xfree86_4.3.0.oe | 0 71 files changed, 24323 insertions(+), 60 deletions(-) delete mode 100644 alsa-tools/alsa-tools_0.9.8.oe create mode 100644 bison/bison-1.875/m4.patch create mode 100644 bluez-utils/bluez-utils-2.3/configure.patch create mode 100644 centericq/centericq-4.9.7/m4.patch create mode 100644 e2fsprogs-libs/e2fsprogs-libs-1.34/ldflags.patch create mode 100644 e2fsprogs-libs/e2fsprogs-libs-1.34/m4.patch create mode 100644 e2fsprogs/e2fsprogs-1.34/e2fsprogs_1.34.oe create mode 100644 e2fsprogs/e2fsprogs-1.34/ldflags.patch create mode 100644 e2fsprogs/e2fsprogs-1.34/m4.patch create mode 100644 findutils/findutils-4.1.20/m4.patch create mode 100644 jpeg/jpeg-6b/ldflags.patch create mode 100644 liblockfile/liblockfile-1.05/ldflags.patch create mode 100644 libpcap/libpcap-0.7.2/ldflags.patch create mode 100644 nonworking/alsa-tools/alsa-tools_0.9.8.oe create mode 100644 nonworking/python/python-2.3.2/bindir-libdir.patch create mode 100644 nonworking/python/python-native_2.3.2.oe create mode 100644 nonworking/python/python_2.3.2.oe create mode 100644 nonworking/vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch create mode 100644 nonworking/vpnc/vpnc_0.2-rm+zomb-pre6.oe create mode 100644 nonworking/xfree86/xfree86-4.3.0/dirty-3.2-xterm-breakage-fix.patch create mode 100644 nonworking/xfree86/xfree86-4.3.0/host.def create mode 100644 nonworking/xfree86/xfree86-4.3.0/tinyx-kbd-enable-fix.patch create mode 100644 nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch create mode 100644 nonworking/xfree86/xfree86_4.3.0.oe delete mode 100644 python/python-2.3.2/bindir-libdir.patch delete mode 100644 python/python-native_2.3.2.oe delete mode 100644 python/python_2.3.2.oe delete mode 100644 resolvconf/resolvconf_0.41.oe create mode 100644 resolvconf/resolvconf_1.0.oe create mode 100644 resolvconf/resolvconf_1.2.oe create mode 100644 udev/udev_006.oe delete mode 100644 vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch delete mode 100644 vpnc/vpnc_0.2-rm+zomb-pre6.oe delete mode 100644 xfree86/xfree86-4.3.0/dirty-3.2-xterm-breakage-fix.patch delete mode 100644 xfree86/xfree86-4.3.0/host.def delete mode 100644 xfree86/xfree86-4.3.0/tinyx-kbd-enable-fix.patch delete mode 100644 xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch delete mode 100644 xfree86/xfree86_4.3.0.oe diff --git a/alsa-tools/alsa-tools_0.9.8.oe b/alsa-tools/alsa-tools_0.9.8.oe deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/alsa-utils/alsa-utils_0.9.8.oe b/alsa-utils/alsa-utils_0.9.8.oe index e69de29bb2..8ae86cd5b6 100644 --- a/alsa-utils/alsa-utils_0.9.8.oe +++ b/alsa-utils/alsa-utils_0.9.8.oe @@ -0,0 +1,8 @@ +DESCRIPTION="Alsa Utilities" +MAINTAINER="Lorn Potter " +LICENSE="GPL" +DEPENDS="virtual/libc" + +SRC_URI="ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2" + +inherit autotools diff --git a/binutils/binutils_2.14.90.0.6.oe b/binutils/binutils_2.14.90.0.6.oe index 7578e0e110..d028e6cf4c 100644 --- a/binutils/binutils_2.14.90.0.6.oe +++ b/binutils/binutils_2.14.90.0.6.oe @@ -61,6 +61,10 @@ python do_patch () { oe.build.exec_func('binutilsbuild_do_patch', d) } +do_configure () { + oe_runconf +} + do_install () { autotools_do_install cd ${D}/${bindir} diff --git a/bison/bison-1.875/m4.patch b/bison/bison-1.875/m4.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bison/bison_1.875.oe b/bison/bison_1.875.oe index e69de29bb2..21f773340e 100644 --- a/bison/bison_1.875.oe +++ b/bison/bison_1.875.oe @@ -0,0 +1,7 @@ +DEPENDS = virtual/libc +RDEPENDS = libc6 + +SRC_URI = ${GNU_MIRROR}/bison/bison-${PV}.tar.bz2 \ + file://${FILESDIR}/m4.patch;patch=1 + +inherit autotools diff --git a/bluez-hcidump/bluez-hcidump-1.5/configure.patch b/bluez-hcidump/bluez-hcidump-1.5/configure.patch index e69de29bb2..fe40bfb3ad 100644 --- a/bluez-hcidump/bluez-hcidump-1.5/configure.patch +++ b/bluez-hcidump/bluez-hcidump-1.5/configure.patch @@ -0,0 +1,29 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- bluez-hcidump-1.5/configure.in~configure ++++ bluez-hcidump-1.5/configure.in +@@ -24,8 +24,8 @@ + AC_ARG_WITH(bluez-libs, + --with-bluez-libs=DIR BlueZ libraries and header files, + [ +- BLUEZ_INCDIR="$withval"/include +- BLUEZ_LIBDIR="$withval"/src ++ BLUEZ_INCDIR="$withval/include $withval/include/bluetooth" ++ BLUEZ_LIBDIR="$withval"/lib + ],[ + BLUEZ_INCDIR='../libs/include /usr/include/bluetooth' + BLUEZ_LIBDIR='../libs/src /usr/lib' +--- bluez-hcidump-1.5/acinclude.m4~configure ++++ bluez-hcidump-1.5/acinclude.m4 +@@ -74,7 +74,7 @@ + p=`cd $p && pwd` + + # Check for libtool library +- if test -f $p/lib$1.la; then ++ if test -f $p/lib$1.la -a -d $p/.libs; then + path=$p/.libs + else + path=$p diff --git a/bluez-hcidump/bluez-hcidump_1.5.oe b/bluez-hcidump/bluez-hcidump_1.5.oe index e69de29bb2..aa8f25f932 100644 --- a/bluez-hcidump/bluez-hcidump_1.5.oe +++ b/bluez-hcidump/bluez-hcidump_1.5.oe @@ -0,0 +1,13 @@ +SECTION="libs" +PRIORITY="optional" +RDEPENDS="libc6" +SECTION="libs" +DEPENDS=virtual/libc virtual/libbluetooth + +SRC_URI = http://bluez.sourceforge.net/download/${PN}-${PV}.tar.gz \ + file://${FILESDIR}/configure.patch;patch=1 +S=${WORKDIR}/${P} + +EXTRA_OECONF:="--with-bluez-libs=${STAGING_DIR}/target" + +inherit autotools libtool diff --git a/bluez-libs/bluez-libs_2.4.oe b/bluez-libs/bluez-libs_2.4.oe index 511825048e..6b54785371 100644 --- a/bluez-libs/bluez-libs_2.4.oe +++ b/bluez-libs/bluez-libs_2.4.oe @@ -23,6 +23,5 @@ do_stage () { do install -m 0644 include/${X} ${STAGING_DIR}/target/include/bluetooth/${X} done - + install -m 0644 src/.libs/libbluetooth.lai ${STAGING_LIBDIR}/libbluetooth.la } - diff --git a/bluez-sdp/bluez-sdp_1.5.oe b/bluez-sdp/bluez-sdp_1.5.oe index e69de29bb2..f9e6a3fb87 100644 --- a/bluez-sdp/bluez-sdp_1.5.oe +++ b/bluez-sdp/bluez-sdp_1.5.oe @@ -0,0 +1,30 @@ +SECTION="libs" +PRIORITY="optional" +RDEPENDS="libc6" +SECTION="libs" +DEPENDS=virtual/libc virtual/libbluetooth +PROVIDES=virtual/libsdp + +SRC_URI = "http://bluez.sourceforge.net/download/${PN}-${PV}.tar.gz" +S=${WORKDIR}/${P} + +EXTRA_OECONF:="--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_DIR}/target/include" +LDFLAGS_prepend = "-L${S}/libs " + +inherit autotools libtool + +do_stage () { + install -m 0644 libs/.libs/libsdp.a ${STAGING_LIBDIR}/ + install -m 0644 libs/.libs/libsdp.lai ${STAGING_LIBDIR}/libsdp.la + install -m 0755 libs/.libs/libsdp.so.2.0.1 ${STAGING_LIBDIR}/ + + ln -sf ${STAGING_LIBDIR}/libsdp.so.2.0.1 ${STAGING_LIBDIR}/libsdp.so.2 + ln -sf ${STAGING_LIBDIR}/libsdp.so.2.0.1 ${STAGING_LIBDIR}/libsdp.so + + for X in sdp.h sdp_lib.h + do + install -m 0644 include/${X} ${STAGING_DIR}/target/include/bluetooth/${X} + done + +} + diff --git a/bluez-utils/bluez-utils-2.3/configure.patch b/bluez-utils/bluez-utils-2.3/configure.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bluez-utils/bluez-utils_2.3.oe b/bluez-utils/bluez-utils_2.3.oe index e69de29bb2..b7846ca54e 100644 --- a/bluez-utils/bluez-utils_2.3.oe +++ b/bluez-utils/bluez-utils_2.3.oe @@ -0,0 +1,12 @@ +SECTION="libs" +PRIORITY="optional" +RDEPENDS="libc6" +SECTION="libs" +DEPENDS=virtual/libc virtual/libbluetooth + +SRC_URI = "http://bluez.sourceforge.net/download/${PN}-${PV}.tar.gz \ + file://${FILESDIR}/configure.patch;patch=1" + +EXTRA_OECONF:="--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_DIR}/target/include" + +inherit autotools libtool diff --git a/centericq/centericq-4.9.7/m4.patch b/centericq/centericq-4.9.7/m4.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/centericq/centericq_4.9.7.oe b/centericq/centericq_4.9.7.oe index e69de29bb2..03917c8fde 100644 --- a/centericq/centericq_4.9.7.oe +++ b/centericq/centericq_4.9.7.oe @@ -0,0 +1,10 @@ +DEPENDS = virtual/libc openssl ncurses +RDEPENDS = libc6 openssl ncurses + +SRC_URI = http://thekonst.net/download/centericq-4.9.7.tar.bz2 \ + file://${FILESDIR}/configure.patch;patch=1 \ + file://${FILESDIR}/m4.patch;patch=1 + +inherit autotools + +EXTRA_OECONF = '--with-ssl --with-openssl=${STAGING_DIR}/target' diff --git a/e2fsprogs-libs/e2fsprogs-libs-1.34/ldflags.patch b/e2fsprogs-libs/e2fsprogs-libs-1.34/ldflags.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/e2fsprogs-libs/e2fsprogs-libs-1.34/m4.patch b/e2fsprogs-libs/e2fsprogs-libs-1.34/m4.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/e2fsprogs-libs/e2fsprogs-libs_1.34.oe b/e2fsprogs-libs/e2fsprogs-libs_1.34.oe index 3ff5916bb4..60eb2ebb52 100644 --- a/e2fsprogs-libs/e2fsprogs-libs_1.34.oe +++ b/e2fsprogs-libs/e2fsprogs-libs_1.34.oe @@ -7,12 +7,16 @@ DEPENDS=virtual/libc SRC_URI=${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-libs-${PV}.tar.gz \ file://${FILESDIR}/configure.patch;patch=1 \ - file://${FILESDIR}/compile-subst.patch;patch=1 + file://${FILESDIR}/compile-subst.patch;patch=1 \ + file://${FILESDIR}/m4.patch;patch=1 \ + file://${FILESDIR}/ldflags.patch;patch=1 inherit autotools +EXTRA_OECONF='--with-ldopts="${LDFLAGS}"' do_compile_prepend () { find ./ -print|xargs chmod u=rwX + ( cd util; ${BUILD_CC} subst.c -o subst ) } do_stage () { diff --git a/e2fsprogs/e2fsprogs-1.34/e2fsprogs_1.34.oe b/e2fsprogs/e2fsprogs-1.34/e2fsprogs_1.34.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/e2fsprogs/e2fsprogs-1.34/ldflags.patch b/e2fsprogs/e2fsprogs-1.34/ldflags.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/e2fsprogs/e2fsprogs-1.34/m4.patch b/e2fsprogs/e2fsprogs-1.34/m4.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/e2fsprogs/e2fsprogs_1.34.oe b/e2fsprogs/e2fsprogs_1.34.oe index e69de29bb2..7a3735a0bb 100644 --- a/e2fsprogs/e2fsprogs_1.34.oe +++ b/e2fsprogs/e2fsprogs_1.34.oe @@ -0,0 +1,21 @@ +DESCRIPTION="EXT2 Filesystem Utilities" +SECTION="base" +PRIORITY="optional" +MAINTAINER="Greg Gilbert " +RDEPENDS="libc6" +DEPENDS=virtual/libc + +SRC_URI=${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz \ + file://${FILESDIR}/ln.patch;patch=1 \ + file://${FILESDIR}/configure.patch;patch=1 \ + file://${FILESDIR}/compile-subst.patch;patch=1 \ + file://${FILESDIR}/m4.patch;patch=1 \ + file://${FILESDIR}/ldflags.patch;patch=1 + +inherit autotools + +EXTRA_OECONF='--with-ldopts="${LDFLAGS}"' +do_compile_prepend () { + find ./ -print|xargs chmod u=rwX + ( cd util; ${BUILD_CC} subst.c -o subst ) +} diff --git a/fakeroot/fakeroot-native_0.7.8.oe b/fakeroot/fakeroot-native_0.7.8.oe index e69de29bb2..b8ed092dff 100644 --- a/fakeroot/fakeroot-native_0.7.8.oe +++ b/fakeroot/fakeroot-native_0.7.8.oe @@ -0,0 +1,5 @@ +SRC_URI := ${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.tar.gz +S = ${WORKDIR}/fakeroot-${PV} + +inherit autotools +inherit native diff --git a/findutils/findutils-4.1.20/m4.patch b/findutils/findutils-4.1.20/m4.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/findutils/findutils_4.1.20.oe b/findutils/findutils_4.1.20.oe index 271a93c6f3..6e750c88a2 100644 --- a/findutils/findutils_4.1.20.oe +++ b/findutils/findutils_4.1.20.oe @@ -2,7 +2,8 @@ DEPENDS = virtual/libc RDEPENDS = libc6 SRC_URI := ftp://alpha.gnu.org/gnu/findutils/findutils-4.1.20.tar.gz \ - file://${FILESDIR}/configure.patch;patch=1 + file://${FILESDIR}/configure.patch;patch=1 \ + file://${FILESDIR}/m4.patch;patch=1 S := ${WORKDIR}/${P} inherit autotools diff --git a/gcc/gcc-cross_3.3.2.oe b/gcc/gcc-cross_3.3.2.oe index e69de29bb2..0ccdc4ef73 100644 --- a/gcc/gcc-cross_3.3.2.oe +++ b/gcc/gcc-cross_3.3.2.oe @@ -0,0 +1,54 @@ +include gcc_${PV}.oe +inherit cross +FILESDIR = ${@os.path.dirname(oe.data.getVar('FILE',d,1))}/gcc-${PV} + +DEPENDS := virtual/${TARGET_SYS}-binutils \ + virtual/glibc virtual/glibc-headers patcher +PROVIDES := virtual/${TARGET_SYS}-gcc \ + virtual/${TARGET_SYS}-g++ + +PACKAGES = + +EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/usr/local \ + --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \ + --enable-target-optspace \ + --with-gnu-ld \ + --enable-languages=c,c++ \ + --enable-shared \ + --enable-multilib \ + --program-prefix=${TARGET_SYS}- + +export CPPFLAGS = +export CXXFLAGS = +export CFLAGS = +export LDFLAGS = + +do_configure () { + export CC="${BUILD_CC}" + export AR="${TARGET_SYS}-ar" + export RANLIB="${TARGET_SYS}-ranlib" + export LD="${TARGET_SYS}-ld" + export NM="${TARGET_SYS}-nm" + oe_runconf +} + +do_compile_prepend () { + export CC="${BUILD_CC}" + export AR_FOR_TARGET="${TARGET_SYS}-ar" + export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" + export LD_FOR_TARGET="${TARGET_SYS}-ld" + export NM_FOR_TARGET="${TARGET_SYS}-nm" + export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc" +} + +do_stage_append () { +# # Cleanup after gcc's --program-prefix failing.. +# ( cd ${CROSS_DIR}/bin ; for p in ${TARGET_SYS}-* ; do +# mv $p `echo $p | sed -e s,${TARGET_SYS},${TARGET_ARCH}-uclibc,` +# done ) + + rm -f ${CROSS_DIR}/bin/gccbug ${CROSS_DIR}/bin/gcov + for d in info man share/doc share/locale ; do + rm -rf ${CROSS_DIR}/$d + done +} diff --git a/glibc/glibc_2.3.2.oe b/glibc/glibc_2.3.2.oe index af22f2e48c..c5ae1b4a3b 100644 --- a/glibc/glibc_2.3.2.oe +++ b/glibc/glibc_2.3.2.oe @@ -77,7 +77,21 @@ glibcbuild_do_unpack () { if [ -e "${FILESDIR}/asm-${TARGET_ARCH}-unistd.h" ]; then cp -a "${FILESDIR}/asm-${TARGET_ARCH}-unistd.h" "${WORKDIR}/linux/include/asm-${TARGET_ARCH}/unistd.h" fi - ln -sf "asm-${TARGET_ARCH}" "${WORKDIR}/linux/include/asm" + case "${TARGET_ARCH}" in + i686) + TARGET_ARCH=i386 + ;; + i586) + TARGET_ARCH=i386 + ;; + i486) + TARGET_ARCH=i386 + ;; + esac + if test ! -e ${WORKDIR}/linux/include/asm-$TARGET_ARCH; then + oefatal unable to create asm symlink in kernel headers + fi + ln -sf "asm-$TARGET_ARCH" "${WORKDIR}/linux/include/asm" } python do_unpack () { @@ -119,12 +133,19 @@ do_stage() { mv '${STAGING_LIBDIR}/libpthread.so' '${STAGING_LIBDIR}/libpthread-old.so' cat '${STAGING_LIBDIR}/libpthread-old.so' | sed -e's,/lib/,,g' > '${STAGING_LIBDIR}/libpthread.so' cp -a '${WORKDIR}/linux/include/linux' '${STAGING_DIR}/target/include/' - cp -a '${WORKDIR}/linux/include/asm-${TARGET_ARCH}' '${STAGING_DIR}/target/include/' + install -d ${STAGING_DIR}/target/include/gnu \ + ${STAGING_DIR}/target/include/bits + install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_DIR}/target/include/gnu/ + install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_DIR}/target/include/bits/ for r in ${rpcsvc}; do h=`echo $r|sed -e's,\.x$,.h,'` install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_DIR}/target/include/rpcsvc/ done - ln -sf 'asm-${TARGET_ARCH}' '${STAGING_DIR}/target/include/asm' + cp -a '${WORKDIR}/linux/include/asm' '${STAGING_DIR}/target/include/' + cp -a "${WORKDIR}/linux/include/`readlink ${WORKDIR}/linux/include/asm`" '${STAGING_DIR}/target/include/' + install -m 0644 ${B}/libc_nonshared.a ${STAGING_LIBDIR}/ + install -m 0644 ${B}/libc_pic.a ${STAGING_LIBDIR}/ + install -m 0644 ${B}/libc.a ${STAGING_LIBDIR}/ } do_install() { diff --git a/jpeg/jpeg-6b/ldflags.patch b/jpeg/jpeg-6b/ldflags.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jpeg/jpeg_6b.oe b/jpeg/jpeg_6b.oe index e69de29bb2..abc9900624 100644 --- a/jpeg/jpeg_6b.oe +++ b/jpeg/jpeg_6b.oe @@ -0,0 +1,33 @@ +SECTION="libs" +PRIORITY="required" +MAINTAINER="Chris Larson " +RDEPENDS="libc6" +DEPENDS=virtual/libc + +SRC_URI = http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \ + file://${FILESDIR}/debian.patch;patch=1 \ + file://${FILESDIR}/ldflags.patch;patch=1 + +inherit autotools libtool + +EXTRA_OECONF="--enable-static --enable-shared" + +CFLAGS_append = " -D_REENTRANT" + +do_stage() { + install -m 644 -D jconfig.h ${STAGING_DIR}/target/include/jconfig.h + install -m 644 -D jpeglib.h ${STAGING_DIR}/target/include/jpeglib.h + install -m 644 -D jmorecfg.h ${STAGING_DIR}/target/include/jmorecfg.h + install -m 644 -D jerror.h ${STAGING_DIR}/target/include/jerror.h + install -m 644 -D jpegint.h ${STAGING_DIR}/target/include/jpegint.h + install -m 755 -D .libs/libjpeg.so.62.0.0 ${STAGING_LIBDIR}/libjpeg.so.62.0.0 + ln -sf libjpeg.so.62.0.0 ${STAGING_LIBDIR}/libjpeg.so.62 + ln -sf libjpeg.so.62.0.0 ${STAGING_LIBDIR}/libjpeg.so +} + +do_install() { + install -d ${D}/${bindir} ${D}/${includedir} \ + ${D}/${mandir}/man1 ${D}/${libdir} + oe_runmake 'prefix=${D}/${prefix}' 'exec_prefix=${D}/${exec_prefix}' \ + install +} diff --git a/liblockfile/liblockfile-1.05/ldflags.patch b/liblockfile/liblockfile-1.05/ldflags.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/liblockfile/liblockfile_1.05.oe b/liblockfile/liblockfile_1.05.oe index 0f9fe563a2..7e054f1ccd 100644 --- a/liblockfile/liblockfile_1.05.oe +++ b/liblockfile/liblockfile_1.05.oe @@ -2,8 +2,9 @@ DEPENDS = virtual/libc RDEPENDS = libc6 SRC_URI = ${DEBIAN_MIRROR}/main/libl/liblockfile/liblockfile_${PV}.tar.gz \ - file:/${FILESDIR}/install.patch;patch=1 \ - file:/${FILESDIR}/configure.patch;patch=1 + file://${FILESDIR}/install.patch;patch=1 \ + file://${FILESDIR}/configure.patch;patch=1 \ + file://${FILESDIR}/ldflags.patch;patch=1 inherit autotools diff --git a/libpcap/libpcap-0.7.2/ldflags.patch b/libpcap/libpcap-0.7.2/ldflags.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libpcap/libpcap_0.7.2.oe b/libpcap/libpcap_0.7.2.oe index e21a549bd5..279e62ab9b 100644 --- a/libpcap/libpcap_0.7.2.oe +++ b/libpcap/libpcap_0.7.2.oe @@ -7,6 +7,7 @@ RDEPENDS="libc6" SRC_URI=http://www.tcpdump.org/release/libpcap-${PV}.tar.gz; SRC_URI_append=" file://${FILESDIR}/libpcap-shared.patch;patch=1" SRC_URI_append=" file://${FILESDIR}/configure.patch;patch=1" +SRC_URI_append=" file://${FILESDIR}/ldflags.patch;patch=1" DEPENDS=virtual/libc S=${WORKDIR}/libpcap-${PV} diff --git a/libtool/libtool-1.5/libdir-la.patch b/libtool/libtool-1.5/libdir-la.patch index e69de29bb2..8112aef940 100644 --- a/libtool/libtool-1.5/libdir-la.patch +++ b/libtool/libtool-1.5/libdir-la.patch @@ -0,0 +1,62 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- libtool-1.5/ltmain.in~libdir-la ++++ libtool-1.5/ltmain.in +@@ -2082,8 +2082,14 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + else + dir="$ladir/$objdir" +@@ -2545,16 +2551,16 @@ + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" +- else +- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` +- if test -z "$libdir"; then +- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 +- exit 1 +- fi +- if test "$absdir" != "$libdir"; then +- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 +- fi +- path="$absdir" ++# else ++# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++# if test -z "$libdir"; then ++# $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 ++# exit 1 ++# fi ++# if test "$absdir" != "$libdir"; then ++# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 ++# fi ++# path="$absdir" + fi + depdepl= + case $host in +@@ -5072,6 +5072,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` diff --git a/libtool/libtool-cross_1.5.oe b/libtool/libtool-cross_1.5.oe index b3a3506b2b..73cedc9d5c 100644 --- a/libtool/libtool-cross_1.5.oe +++ b/libtool/libtool-cross_1.5.oe @@ -7,7 +7,7 @@ SRC_URI_append = ' file://${FILESDIR}/libdir-la.patch;patch=1 \ file://${FILESDIR}/prefix.patch;patch=1 \ file://${FILESDIR}/chmod.patch;patch=1' S = ${WORKDIR}/libtool-${PV} -FILESDIR = ${TOPDIR}/libtool/libtool-${PV} +FILESDIR = ${@os.path.dirname(oe.data.getVar('FILE',d,1))}/libtool-${PV} prefix=${CROSS_DIR} exec_prefix=${prefix} diff --git a/lisa/lisa_0.2.2.oe b/lisa/lisa_0.2.2.oe index 06322d0579..fe8860cb0a 100644 --- a/lisa/lisa_0.2.2.oe +++ b/lisa/lisa_0.2.2.oe @@ -6,15 +6,11 @@ SRC_URI = http://lisa-home.sourceforge.net/src/lisa-${PV}.tar.bz2 \ inherit autotools libtool -do_configure () { +do_configure_prepend () { set -e rm -f configure.in configure.files acinclude.m4 subdirs oe_runmake -f admin/Makefile.common configure.in oe_runmake -f admin/Makefile.common configure.files cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4 oe_runmake -f admin/Makefile.common subdirs - aclocal -I . -I admin - autoheader - autoconf - oe_runconf } diff --git a/nmap/nmap_3.45.oe b/nmap/nmap_3.45.oe index e69de29bb2..db94220cb2 100644 --- a/nmap/nmap_3.45.oe +++ b/nmap/nmap_3.45.oe @@ -0,0 +1,46 @@ +DEPENDS = virtual/libc libpcap +RDEPENDS = libc6 libpcap +DESCRIPTION = Nmap is a command line portscanner. + +SRC_URI = http://download.insecure.org/nmap/dist/nmap-${PV}.tgz \ + ${DEBIAN_MIRROR}/main/n/nmap/nmap_${PV}-1.diff.gz + +inherit autotools + +EXTRA_OECONF = --with-pcap=linux --with-libpcap=${STAGING_DIR} --without-nmapfe +EXTRA_OEMAKE = "STRIPPROG=arm-linux-strip" + +CXXFLAGS_append = " -fpermissive" +# Ugly hack follows -- their configure.ac doesnt match their configure .. +# doesnt include a check for the length type in recvfrom, so we hack it here +CPPFLAGS_append = " -Drecvfrom6_t=socklen_t" + +#do_configure_prepend () { +# if [ ! -e libpcap-possiblymodified/acinclude.m4 ]; then +# cat libpcap-possiblymodified/aclocal.m4 > libpcap-possiblymodified/acinclude.m4 +# fi +#} + +do_compile_prepend () { + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} libpcre/dftables.c -o libpcre/dftables + touch libpcre/dftables.o + libpcre/dftables > libpcre/chartables.c +} + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now + oe_runconf +} + + +do_install () { + oe_runmake 'prefix=${D}/${prefix}' \ + 'exec_prefix=${D}/${exec_prefix}' \ + 'bindir=${D}/${bindir}' \ + 'sbindir=${D}/${sbindir}' \ + 'mandir=${D}/${mandir}' \ + 'datadir=${D}/${datadir}' \ + 'nmapdatadir=${D}/${datadir}/nmap' \ + install +} diff --git a/nonworking/alsa-tools/alsa-tools_0.9.8.oe b/nonworking/alsa-tools/alsa-tools_0.9.8.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/python/python-2.3.2/bindir-libdir.patch b/nonworking/python/python-2.3.2/bindir-libdir.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/python/python-native_2.3.2.oe b/nonworking/python/python-native_2.3.2.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/python/python_2.3.2.oe b/nonworking/python/python_2.3.2.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch b/nonworking/vpnc/vpnc-0.2-rm+zomb-pre6/attribute.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/vpnc/vpnc_0.2-rm+zomb-pre6.oe b/nonworking/vpnc/vpnc_0.2-rm+zomb-pre6.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/xfree86/xfree86-4.3.0/dirty-3.2-xterm-breakage-fix.patch b/nonworking/xfree86/xfree86-4.3.0/dirty-3.2-xterm-breakage-fix.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/xfree86/xfree86-4.3.0/host.def b/nonworking/xfree86/xfree86-4.3.0/host.def new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/xfree86/xfree86-4.3.0/tinyx-kbd-enable-fix.patch b/nonworking/xfree86/xfree86-4.3.0/tinyx-kbd-enable-fix.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch b/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nonworking/xfree86/xfree86_4.3.0.oe b/nonworking/xfree86/xfree86_4.3.0.oe new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openssh/openssh-3.7.1p1/configure.patch b/openssh/openssh-3.7.1p1/configure.patch index e69de29bb2..35629028cc 100644 --- a/openssh/openssh-3.7.1p1/configure.patch +++ b/openssh/openssh-3.7.1p1/configure.patch @@ -0,0 +1,23706 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- openssh-3.7.1p1/configure.ac~configure ++++ openssh-3.7.1p1/configure.ac +@@ -65,7 +65,7 @@ + for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do + if (test -z "$blibflags"); then + LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" +- AC_TRY_LINK([], [], [blibflags=$tryflags]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[blibflags=$tryflags],[]) + fi + done + if (test -z "$blibflags"); then +@@ -85,13 +85,9 @@ + dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) + AC_CHECK_DECL(loginfailed, + [AC_MSG_CHECKING(if loginfailed takes 4 arguments) +- AC_TRY_COMPILE( +- [#include ], +- [(void)loginfailed("user","host","tty",0);], +- [AC_MSG_RESULT(yes) +- AC_DEFINE(AIX_LOGINFAILED_4ARG)], +- [AC_MSG_RESULT(no)] +- )], ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[(void)loginfailed("user","host","tty",0);]])],[AC_MSG_RESULT(yes) ++ AC_DEFINE(AIX_LOGINFAILED_4ARG)],[AC_MSG_RESULT(no) ++ ])], + [], + [#include ] + ) +@@ -123,15 +119,13 @@ + ;; + *-*-darwin*) + AC_MSG_CHECKING(if we have working getaddrinfo) +- AC_TRY_RUN([#include ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include + main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) + exit(0); + else + exit(1); +-}], [AC_MSG_RESULT(working)], +- [AC_MSG_RESULT(buggy) +- AC_DEFINE(BROKEN_GETADDRINFO)], +- [AC_MSG_RESULT(assume it is working)]) ++}]])],[AC_MSG_RESULT(working)],[AC_MSG_RESULT(buggy) ++ AC_DEFINE(BROKEN_GETADDRINFO)],[AC_MSG_RESULT(assume it is working)]) + ;; + *-*-hpux10.26) + if test -z "$GCC"; then +@@ -442,16 +436,14 @@ + ) + + AC_MSG_CHECKING(compiler and flags for sanity) +-AC_TRY_RUN([ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + int main(){exit(0);} +- ], +- [ AC_MSG_RESULT(yes) ], +- [ ++ ]])],[ AC_MSG_RESULT(yes) ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***]) +- ] +-) ++ ],[ AC_MSG_RESULT(yes) ++]) + + # Checks for header files. + AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ +@@ -483,8 +475,7 @@ + ac_cv_have_broken_dirname, [ + save_LIBS="$LIBS" + LIBS="$LIBS -lgen" +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + +@@ -499,10 +490,8 @@ + exit(0); + } + } +- ], +- [ ac_cv_have_broken_dirname="no" ], +- [ ac_cv_have_broken_dirname="yes" ] +- ) ++ ]])],[ ac_cv_have_broken_dirname="no" ],[ ac_cv_have_broken_dirname="yes" ++ ],[]) + LIBS="$save_LIBS" + ]) + if test "x$ac_cv_have_broken_dirname" = "xno" ; then +@@ -609,19 +598,18 @@ + ] + ) + +-AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) +-AC_TRY_RUN( +- [ +-#include +-#include +-int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} +- ], +- [AC_MSG_RESULT(yes)], +- [ +- AC_MSG_RESULT(no) +- AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) +- ] +-) ++AC_CACHE_CHECK([whether struct dirent allocates space for d_name], ac_cv_have_space_d_name_in_struct_dirent, [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ #include ++ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} ++ ]])],[ac_cv_have_space_d_name_in_struct_dirent="yes"],[ac_cv_have_space_d_name_in_struct_dirent="no" ++ ],[]) ++]) ++ ++if test "x$ac_cv_dirent_have_space_d_name" = "xyes" ; then ++ AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) ++fi + + # Check whether user wants S/Key support + SKEY_MSG="no" +@@ -641,17 +629,14 @@ + SKEY_MSG="yes" + + AC_MSG_CHECKING([for s/key support]) +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } +- ], +- [AC_MSG_RESULT(yes)], +- [ ++ ]])],[AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) +- ]) ++ ],[]) + fi + ] + ) +@@ -689,22 +674,18 @@ + LIBWRAP="-lwrap" + LIBS="$LIBWRAP $LIBS" + AC_MSG_CHECKING(for libwrap) +- AC_TRY_LINK( +- [ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + int deny_severity = 0, allow_severity = 0; +- ], +- [hosts_access(0);], +- [ ++ ]], [[hosts_access(0);]])],[ + AC_MSG_RESULT(yes) + AC_DEFINE(LIBWRAP) + AC_SUBST(LIBWRAP) + TCPW_MSG="yes" +- ], +- [ ++ ],[ + AC_MSG_ERROR([*** libwrap missing]) +- ] +- ) ++ ++ ]) + LIBS="$saved_LIBS" + fi + ] +@@ -760,52 +741,47 @@ + + # Check for broken snprintf + if test "x$ac_cv_func_snprintf" = "xyes" ; then +- AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) +- AC_TRY_RUN( +- [ ++AC_CACHE_CHECK([whether snprintf correctly terminates long strings], ++ ac_cv_have_broken_snprintf, [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} +- ], +- [AC_MSG_RESULT(yes)], +- [ +- AC_MSG_RESULT(no) +- AC_DEFINE(BROKEN_SNPRINTF) +- AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) +- ] +- ) ++ ]])],[ ac_cv_have_broken_snprintf="no" ],[ ac_cv_have_broken_snprintf="yes" ++ ],[]) ++]) ++if test "x$ac_cv_have_broken_snprintf" = "xyes" ; then ++ AC_DEFINE(BROKEN_SNPRINTF) ++ AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) ++fi + fi + + dnl see whether mkstemp() requires XXXXXX + if test "x$ac_cv_func_mkdtemp" = "xyes" ; then + AC_MSG_CHECKING([for (overly) strict mkstemp]) +-AC_TRY_RUN( +- [ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + main() { char template[]="conftest.mkstemp-test"; + if (mkstemp(template) == -1) + exit(1); + unlink(template); exit(0); + } +- ], +- [ ++ ]])],[ + AC_MSG_RESULT(no) +- ], +- [ ++ ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_STRICT_MKSTEMP) +- ], +- [ ++ ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_STRICT_MKSTEMP) +- ] +-) ++ ++]) + fi + + dnl make sure that openpty does not reacquire controlling terminal + if test ! -z "$check_for_openpty_ctty_bug"; then +- AC_MSG_CHECKING(if openpty correctly handles controlling tty) +- AC_TRY_RUN( +- [ ++AC_CACHE_CHECK([if openpty acquires controlling terminal], ++ ac_cv_have_openpty_ctty_bug, [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include +@@ -837,15 +813,12 @@ + exit(0); /* Did not acquire ctty: OK */ + } + } +- ], +- [ +- AC_MSG_RESULT(yes) +- ], +- [ +- AC_MSG_RESULT(no) +- AC_DEFINE(SSHD_ACQUIRES_CTTY) +- ] +- ) ++ ]])],[ ac_cv_have_openpty_ctty_bug="no" ],[ ac_cv_have_openpty_ctty_bug="yes" ++ ],[]) ++]) ++if test "x$ac_cv_have_openpty_ctty_bug" = "xyes" ; then ++ AC_DEFINE(SSHD_ACQUIRES_CTTY) ++fi + fi + + AC_FUNC_GETPGRP +@@ -883,19 +856,15 @@ + if test "x$PAM_MSG" = "xyes" ; then + # Check PAM strerror arguments (old PAM) + AC_MSG_CHECKING([whether pam_strerror takes only one argument]) +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [(void)pam_strerror((pam_handle_t *)NULL, -1);], +- [AC_MSG_RESULT(no)], +- [ ++ ]], [[(void)pam_strerror((pam_handle_t *)NULL, -1);]])],[AC_MSG_RESULT(no)],[ + AC_DEFINE(HAVE_OLD_PAM) + AC_MSG_RESULT(yes) + PAM_MSG="yes (old library)" +- ] +- ) ++ ++ ]) + fi + + # Some systems want crypt() from libcrypt, *not* the version in OpenSSL, +@@ -952,8 +921,7 @@ + + # Determine OpenSSL header version + AC_MSG_CHECKING([OpenSSL header version]) +-AC_TRY_RUN( +- [ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include +@@ -971,21 +939,21 @@ + + exit(0); + } +- ], +- [ ++ ]])],[ + ssl_header_ver=`cat conftest.sslincver` + AC_MSG_RESULT($ssl_header_ver) +- ], +- [ ++ ],[ + AC_MSG_RESULT(not found) + AC_MSG_ERROR(OpenSSL version header not found.) +- ] +-) ++ ],[ ++ AC_MSG_RESULT(unknown) ++ AC_MSG_WARN(Skipping OpenSSL header version check due to crosscompilation.) ++ ++]) + + # Determine OpenSSL library version + AC_MSG_CHECKING([OpenSSL library version]) +-AC_TRY_RUN( +- [ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include +@@ -1004,35 +972,36 @@ + + exit(0); + } +- ], +- [ ++ ]])],[ + ssl_library_ver=`cat conftest.ssllibver` + AC_MSG_RESULT($ssl_library_ver) +- ], +- [ ++ ],[ + AC_MSG_RESULT(not found) + AC_MSG_ERROR(OpenSSL library not found.) +- ] +-) ++ ],[ ++ AC_MSG_RESULT(unknown) ++ AC_MSG_WARN(Skipping OpenSSL library version check due to crosscompilation.) ++ ++]) + + # Sanity check OpenSSL headers + AC_MSG_CHECKING([whether OpenSSL's headers match the library]) +-AC_TRY_RUN( +- [ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } +- ], +- [ ++ ]])],[ + AC_MSG_RESULT(yes) +- ], +- [ ++ ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([Your OpenSSL headers do not match your library. + Check config.log for details. + Also see contrib/findssl.sh for help identifying header/library mismatches.]) +- ] +-) ++ ],[ ++ AC_MSG_RESULT(unknown) ++ AC_MSG_WARN(Skipping OpenSSL version comparison due to crosscompilation.) ++ ++]) + + # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the + # version in OpenSSL. Skip this for PAM +@@ -1040,30 +1009,8 @@ + AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") + fi + +- + ### Configure cryptographic random number support + +-# Check wheter OpenSSL seeds itself +-AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) +-AC_TRY_RUN( +- [ +-#include +-#include +-int main(void) { exit(RAND_status() == 1 ? 0 : 1); } +- ], +- [ +- OPENSSL_SEEDS_ITSELF=yes +- AC_MSG_RESULT(yes) +- ], +- [ +- AC_MSG_RESULT(no) +- # Default to use of the rand helper if OpenSSL doesn't +- # seed itself +- USE_RAND_HELPER=yes +- ] +-) +- +- + # Do we want to force the use of the rand helper? + AC_ARG_WITH(rand-helper, + [ --with-rand-helper Use subprocess to gather strong randomness ], +@@ -1080,6 +1027,24 @@ + USE_RAND_HELPER=yes + fi + ], ++ # Check whether OpenSSL seeds itself ++ [ ++ AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ #include ++ int main(void) { exit(RAND_status() == 1 ? 0 : 1); } ++ ]])],[ ++ OPENSSL_SEEDS_ITSELF=yes ++ AC_MSG_RESULT(yes) ++ ],[ ++ AC_MSG_RESULT(no) ++ # Default to use of the rand helper if OpenSSL doesn't ++ # seed itself ++ USE_RAND_HELPER=yes ++ ++ ],[]) ++ ] + ) + + # Which randomness source do we use? +@@ -1261,12 +1226,8 @@ + + # More checks for data types + AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ +- AC_TRY_COMPILE( +- [ #include ], +- [ u_int a; a = 1;], +- [ ac_cv_have_u_int="yes" ], +- [ ac_cv_have_u_int="no" ] +- ) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ u_int a; a = 1;]])],[ ac_cv_have_u_int="yes" ],[ ac_cv_have_u_int="no" ++ ]) + ]) + if test "x$ac_cv_have_u_int" = "xyes" ; then + AC_DEFINE(HAVE_U_INT) +@@ -1274,12 +1235,8 @@ + fi + + AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [ +- AC_TRY_COMPILE( +- [ #include ], +- [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], +- [ ac_cv_have_intxx_t="yes" ], +- [ ac_cv_have_intxx_t="no" ] +- ) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],[ ac_cv_have_intxx_t="yes" ],[ ac_cv_have_intxx_t="no" ++ ]) + ]) + if test "x$ac_cv_have_intxx_t" = "xyes" ; then + AC_DEFINE(HAVE_INTXX_T) +@@ -1290,20 +1247,15 @@ + test "x$ac_cv_header_stdint_h" = "xyes") + then + AC_MSG_CHECKING([for intXX_t types in stdint.h]) +- AC_TRY_COMPILE( +- [ #include ], +- [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],[ + AC_DEFINE(HAVE_INTXX_T) + AC_MSG_RESULT(yes) +- ], +- [ AC_MSG_RESULT(no) ] +- ) ++ ],[ AC_MSG_RESULT(no) ++ ]) + fi + + AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #ifdef HAVE_STDINT_H + # include +@@ -1312,23 +1264,16 @@ + #ifdef HAVE_SYS_BITYPES_H + # include + #endif +- ], +- [ int64_t a; a = 1;], +- [ ac_cv_have_int64_t="yes" ], +- [ ac_cv_have_int64_t="no" ] +- ) ++ ]], [[ int64_t a; a = 1;]])],[ ac_cv_have_int64_t="yes" ],[ ac_cv_have_int64_t="no" ++ ]) + ]) + if test "x$ac_cv_have_int64_t" = "xyes" ; then + AC_DEFINE(HAVE_INT64_T) + fi + + AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ +- AC_TRY_COMPILE( +- [ #include ], +- [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], +- [ ac_cv_have_u_intxx_t="yes" ], +- [ ac_cv_have_u_intxx_t="no" ] +- ) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],[ ac_cv_have_u_intxx_t="yes" ],[ ac_cv_have_u_intxx_t="no" ++ ]) + ]) + if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then + AC_DEFINE(HAVE_U_INTXX_T) +@@ -1337,24 +1282,16 @@ + + if test -z "$have_u_intxx_t" ; then + AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h]) +- AC_TRY_COMPILE( +- [ #include ], +- [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],[ + AC_DEFINE(HAVE_U_INTXX_T) + AC_MSG_RESULT(yes) +- ], +- [ AC_MSG_RESULT(no) ] +- ) ++ ],[ AC_MSG_RESULT(no) ++ ]) + fi + + AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ +- AC_TRY_COMPILE( +- [ #include ], +- [ u_int64_t a; a = 1;], +- [ ac_cv_have_u_int64_t="yes" ], +- [ ac_cv_have_u_int64_t="no" ] +- ) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ u_int64_t a; a = 1;]])],[ ac_cv_have_u_int64_t="yes" ],[ ac_cv_have_u_int64_t="no" ++ ]) + ]) + if test "x$ac_cv_have_u_int64_t" = "xyes" ; then + AC_DEFINE(HAVE_U_INT64_T) +@@ -1363,27 +1300,19 @@ + + if test -z "$have_u_int64_t" ; then + AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h]) +- AC_TRY_COMPILE( +- [ #include ], +- [ u_int64_t a; a = 1], +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ u_int64_t a; a = 1]])],[ + AC_DEFINE(HAVE_U_INT64_T) + AC_MSG_RESULT(yes) +- ], +- [ AC_MSG_RESULT(no) ] +- ) ++ ],[ AC_MSG_RESULT(no) ++ ]) + fi + + if test -z "$have_u_intxx_t" ; then + AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], +- [ ac_cv_have_uintxx_t="yes" ], +- [ ac_cv_have_uintxx_t="no" ] +- ) ++ ]], [[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ]])],[ ac_cv_have_uintxx_t="yes" ],[ ac_cv_have_uintxx_t="no" ++ ]) + ]) + if test "x$ac_cv_have_uintxx_t" = "xyes" ; then + AC_DEFINE(HAVE_UINTXX_T) +@@ -1392,49 +1321,37 @@ + + if test -z "$have_uintxx_t" ; then + AC_MSG_CHECKING([for uintXX_t types in stdint.h]) +- AC_TRY_COMPILE( +- [ #include ], +- [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;], +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;]])],[ + AC_DEFINE(HAVE_UINTXX_T) + AC_MSG_RESULT(yes) +- ], +- [ AC_MSG_RESULT(no) ] +- ) ++ ],[ AC_MSG_RESULT(no) ++ ]) + fi + + if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ + test "x$ac_cv_header_sys_bitypes_h" = "xyes") + then + AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ ++ ]], [[ + int8_t a; int16_t b; int32_t c; + u_int8_t e; u_int16_t f; u_int32_t g; + a = b = c = e = f = g = 1; +- ], +- [ ++ ]])],[ + AC_DEFINE(HAVE_U_INTXX_T) + AC_DEFINE(HAVE_INTXX_T) + AC_MSG_RESULT(yes) +- ], +- [AC_MSG_RESULT(no)] +- ) ++ ],[AC_MSG_RESULT(no) ++ ]) + fi + + + AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ u_char foo; foo = 125; ], +- [ ac_cv_have_u_char="yes" ], +- [ ac_cv_have_u_char="no" ] +- ) ++ ]], [[ u_char foo; foo = 125; ]])],[ ac_cv_have_u_char="yes" ],[ ac_cv_have_u_char="no" ++ ]) + ]) + if test "x$ac_cv_have_u_char" = "xyes" ; then + AC_DEFINE(HAVE_U_CHAR) +@@ -1445,56 +1362,40 @@ + AC_CHECK_TYPES(sig_atomic_t,,,[#include ]) + + AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ size_t foo; foo = 1235; ], +- [ ac_cv_have_size_t="yes" ], +- [ ac_cv_have_size_t="no" ] +- ) ++ ]], [[ size_t foo; foo = 1235; ]])],[ ac_cv_have_size_t="yes" ],[ ac_cv_have_size_t="no" ++ ]) + ]) + if test "x$ac_cv_have_size_t" = "xyes" ; then + AC_DEFINE(HAVE_SIZE_T) + fi + + AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ ssize_t foo; foo = 1235; ], +- [ ac_cv_have_ssize_t="yes" ], +- [ ac_cv_have_ssize_t="no" ] +- ) ++ ]], [[ ssize_t foo; foo = 1235; ]])],[ ac_cv_have_ssize_t="yes" ],[ ac_cv_have_ssize_t="no" ++ ]) + ]) + if test "x$ac_cv_have_ssize_t" = "xyes" ; then + AC_DEFINE(HAVE_SSIZE_T) + fi + + AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ clock_t foo; foo = 1235; ], +- [ ac_cv_have_clock_t="yes" ], +- [ ac_cv_have_clock_t="no" ] +- ) ++ ]], [[ clock_t foo; foo = 1235; ]])],[ ac_cv_have_clock_t="yes" ],[ ac_cv_have_clock_t="no" ++ ]) + ]) + if test "x$ac_cv_have_clock_t" = "xyes" ; then + AC_DEFINE(HAVE_CLOCK_T) + fi + + AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ sa_family_t foo; foo = 1235; ], +- [ ac_cv_have_sa_family_t="yes" ], +- [ AC_TRY_COMPILE( ++ ]], [[ sa_family_t foo; foo = 1235; ]])],[ ac_cv_have_sa_family_t="yes" ],[ AC_TRY_COMPILE( + [ + #include + #include +@@ -1504,36 +1405,28 @@ + [ ac_cv_have_sa_family_t="yes" ], + + [ ac_cv_have_sa_family_t="no" ] +- )] + ) ++ ]) + ]) + if test "x$ac_cv_have_sa_family_t" = "xyes" ; then + AC_DEFINE(HAVE_SA_FAMILY_T) + fi + + AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ pid_t foo; foo = 1235; ], +- [ ac_cv_have_pid_t="yes" ], +- [ ac_cv_have_pid_t="no" ] +- ) ++ ]], [[ pid_t foo; foo = 1235; ]])],[ ac_cv_have_pid_t="yes" ],[ ac_cv_have_pid_t="no" ++ ]) + ]) + if test "x$ac_cv_have_pid_t" = "xyes" ; then + AC_DEFINE(HAVE_PID_T) + fi + + AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ mode_t foo; foo = 1235; ], +- [ ac_cv_have_mode_t="yes" ], +- [ ac_cv_have_mode_t="no" ] +- ) ++ ]], [[ mode_t foo; foo = 1235; ]])],[ ac_cv_have_mode_t="yes" ],[ ac_cv_have_mode_t="no" ++ ]) + ]) + if test "x$ac_cv_have_mode_t" = "xyes" ; then + AC_DEFINE(HAVE_MODE_T) +@@ -1541,73 +1434,53 @@ + + + AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ struct sockaddr_storage s; ], +- [ ac_cv_have_struct_sockaddr_storage="yes" ], +- [ ac_cv_have_struct_sockaddr_storage="no" ] +- ) ++ ]], [[ struct sockaddr_storage s; ]])],[ ac_cv_have_struct_sockaddr_storage="yes" ],[ ac_cv_have_struct_sockaddr_storage="no" ++ ]) + ]) + if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) + fi + + AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ struct sockaddr_in6 s; s.sin6_family = 0; ], +- [ ac_cv_have_struct_sockaddr_in6="yes" ], +- [ ac_cv_have_struct_sockaddr_in6="no" ] +- ) ++ ]], [[ struct sockaddr_in6 s; s.sin6_family = 0; ]])],[ ac_cv_have_struct_sockaddr_in6="yes" ],[ ac_cv_have_struct_sockaddr_in6="no" ++ ]) + ]) + if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) + fi + + AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ struct in6_addr s; s.s6_addr[0] = 0; ], +- [ ac_cv_have_struct_in6_addr="yes" ], +- [ ac_cv_have_struct_in6_addr="no" ] +- ) ++ ]], [[ struct in6_addr s; s.s6_addr[0] = 0; ]])],[ ac_cv_have_struct_in6_addr="yes" ],[ ac_cv_have_struct_in6_addr="no" ++ ]) + ]) + if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_IN6_ADDR) + fi + + AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + #include +- ], +- [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], +- [ ac_cv_have_struct_addrinfo="yes" ], +- [ ac_cv_have_struct_addrinfo="no" ] +- ) ++ ]], [[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ]])],[ ac_cv_have_struct_addrinfo="yes" ],[ ac_cv_have_struct_addrinfo="no" ++ ]) + ]) + if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_ADDRINFO) + fi + + AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ +- AC_TRY_COMPILE( +- [ #include ], +- [ struct timeval tv; tv.tv_sec = 1;], +- [ ac_cv_have_struct_timeval="yes" ], +- [ ac_cv_have_struct_timeval="no" ] +- ) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ struct timeval tv; tv.tv_sec = 1;]])],[ ac_cv_have_struct_timeval="yes" ],[ ac_cv_have_struct_timeval="no" ++ ]) + ]) + if test "x$ac_cv_have_struct_timeval" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_TIMEVAL) +@@ -1626,32 +1499,42 @@ + exit 1; + else + dnl test snprintf (broken on SCO w/gcc) +- AC_TRY_RUN( +- [ +-#include +-#include +-#ifdef HAVE_SNPRINTF +-main() +-{ +- char buf[50]; +- char expected_out[50]; +- int mazsize = 50 ; +-#if (SIZEOF_LONG_INT == 8) +- long int num = 0x7fffffffffffffff; +-#else +- long long num = 0x7fffffffffffffffll; +-#endif +- strcpy(expected_out, "9223372036854775807"); +- snprintf(buf, mazsize, "%lld", num); +- if(strcmp(buf, expected_out) != 0) +- exit(1); +- exit(0); +-} +-#else +-main() { exit(0); } +-#endif +- ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ] +- ) ++ if test "x$ac_cv_have_broken_snprintf" != "xyes" ; then ++# no need to test again if we already know its broken :) ++ AC_CACHE_CHECK([whether snprintf is broken], ++ ac_cv_have_broken_snprintf, [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ #include ++ #ifdef HAVE_SNPRINTF ++ main() ++ { ++ char buf[50]; ++ char expected_out[50]; ++ int mazsize = 50 ; ++ #if (SIZEOF_LONG_INT == 8) ++ long int num = 0x7fffffffffffffff; ++ #else ++ long long num = 0x7fffffffffffffffll; ++ #endif ++ strcpy(expected_out, "9223372036854775807"); ++ snprintf(buf, mazsize, "%lld", num); ++ if(strcmp(buf, expected_out) != 0) ++ exit(1); ++ exit(0); ++ } ++ #else ++ main() { exit(0); } ++ #endif ++ ]])],[ true ],[ ++ ac_cv_have_broken_snprintf="yes" ++ ++ ],[]) ++ ]) ++ if test "x$ac_cv_have_broken_snprintf" = "xyes" ; then ++ AC_DEFINE(BROKEN_SNPRINTF) ++ fi ++ fi + fi + + dnl Checks for structure members +@@ -1677,15 +1560,10 @@ + + AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], + ac_cv_have_ss_family_in_struct_ss, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ struct sockaddr_storage s; s.ss_family = 1; ], +- [ ac_cv_have_ss_family_in_struct_ss="yes" ], +- [ ac_cv_have_ss_family_in_struct_ss="no" ], +- ) ++ ]], [[ struct sockaddr_storage s; s.ss_family = 1; ]])],[ ac_cv_have_ss_family_in_struct_ss="yes" ],[ ac_cv_have_ss_family_in_struct_ss="no" ]) + ]) + if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then + AC_DEFINE(HAVE_SS_FAMILY_IN_SS) +@@ -1693,15 +1571,11 @@ + + AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], + ac_cv_have___ss_family_in_struct_ss, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include +- ], +- [ struct sockaddr_storage s; s.__ss_family = 1; ], +- [ ac_cv_have___ss_family_in_struct_ss="yes" ], +- [ ac_cv_have___ss_family_in_struct_ss="no" ] +- ) ++ ]], [[ struct sockaddr_storage s; s.__ss_family = 1; ]])],[ ac_cv_have___ss_family_in_struct_ss="yes" ],[ ac_cv_have___ss_family_in_struct_ss="no" ++ ]) + ]) + if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then + AC_DEFINE(HAVE___SS_FAMILY_IN_SS) +@@ -1709,14 +1583,10 @@ + + AC_CACHE_CHECK([for pw_class field in struct passwd], + ac_cv_have_pw_class_in_struct_passwd, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ struct passwd p; p.pw_class = 0; ], +- [ ac_cv_have_pw_class_in_struct_passwd="yes" ], +- [ ac_cv_have_pw_class_in_struct_passwd="no" ] +- ) ++ ]], [[ struct passwd p; p.pw_class = 0; ]])],[ ac_cv_have_pw_class_in_struct_passwd="yes" ],[ ac_cv_have_pw_class_in_struct_passwd="no" ++ ]) + ]) + if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then + AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) +@@ -1724,14 +1594,10 @@ + + AC_CACHE_CHECK([for pw_expire field in struct passwd], + ac_cv_have_pw_expire_in_struct_passwd, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ struct passwd p; p.pw_expire = 0; ], +- [ ac_cv_have_pw_expire_in_struct_passwd="yes" ], +- [ ac_cv_have_pw_expire_in_struct_passwd="no" ] +- ) ++ ]], [[ struct passwd p; p.pw_expire = 0; ]])],[ ac_cv_have_pw_expire_in_struct_passwd="yes" ],[ ac_cv_have_pw_expire_in_struct_passwd="no" ++ ]) + ]) + if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then + AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) +@@ -1739,14 +1605,10 @@ + + AC_CACHE_CHECK([for pw_change field in struct passwd], + ac_cv_have_pw_change_in_struct_passwd, [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ struct passwd p; p.pw_change = 0; ], +- [ ac_cv_have_pw_change_in_struct_passwd="yes" ], +- [ ac_cv_have_pw_change_in_struct_passwd="no" ] +- ) ++ ]], [[ struct passwd p; p.pw_change = 0; ]])],[ ac_cv_have_pw_change_in_struct_passwd="yes" ],[ ac_cv_have_pw_change_in_struct_passwd="no" ++ ]) + ]) + if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then + AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) +@@ -1755,8 +1617,7 @@ + dnl make sure we're using the real structure members and not defines + AC_CACHE_CHECK([for msg_accrights field in struct msghdr], + ac_cv_have_accrights_in_msghdr, [ +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include +@@ -1768,10 +1629,8 @@ + m.msg_accrights = 0; + exit(0); + } +- ], +- [ ac_cv_have_accrights_in_msghdr="yes" ], +- [ ac_cv_have_accrights_in_msghdr="no" ] +- ) ++ ]])],[ ac_cv_have_accrights_in_msghdr="yes" ],[ ac_cv_have_accrights_in_msghdr="no" ++ ],[]) + ]) + if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then + AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) +@@ -1779,8 +1638,7 @@ + + AC_CACHE_CHECK([for msg_control field in struct msghdr], + ac_cv_have_control_in_msghdr, [ +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include +@@ -1792,47 +1650,36 @@ + m.msg_control = 0; + exit(0); + } +- ], +- [ ac_cv_have_control_in_msghdr="yes" ], +- [ ac_cv_have_control_in_msghdr="no" ] +- ) ++ ]])],[ ac_cv_have_control_in_msghdr="yes" ],[ ac_cv_have_control_in_msghdr="no" ++ ],[]) + ]) + if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then + AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) + fi + + AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ +- AC_TRY_LINK([], +- [ extern char *__progname; printf("%s", __progname); ], +- [ ac_cv_libc_defines___progname="yes" ], +- [ ac_cv_libc_defines___progname="no" ] +- ) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern char *__progname; printf("%s", __progname); ]])],[ ac_cv_libc_defines___progname="yes" ],[ ac_cv_libc_defines___progname="no" ++ ]) + ]) + if test "x$ac_cv_libc_defines___progname" = "xyes" ; then + AC_DEFINE(HAVE___PROGNAME) + fi + + AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ +- AC_TRY_LINK([ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-], +- [ printf("%s", __FUNCTION__); ], +- [ ac_cv_cc_implements___FUNCTION__="yes" ], +- [ ac_cv_cc_implements___FUNCTION__="no" ] +- ) ++]], [[ printf("%s", __FUNCTION__); ]])],[ ac_cv_cc_implements___FUNCTION__="yes" ],[ ac_cv_cc_implements___FUNCTION__="no" ++ ]) + ]) + if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then + AC_DEFINE(HAVE___FUNCTION__) + fi + + AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ +- AC_TRY_LINK([ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-], +- [ printf("%s", __func__); ], +- [ ac_cv_cc_implements___func__="yes" ], +- [ ac_cv_cc_implements___func__="no" ] +- ) ++]], [[ printf("%s", __func__); ]])],[ ac_cv_cc_implements___func__="yes" ],[ ac_cv_cc_implements___func__="no" ++ ]) + ]) + if test "x$ac_cv_cc_implements___func__" = "xyes" ; then + AC_DEFINE(HAVE___func__) +@@ -1840,25 +1687,18 @@ + + AC_CACHE_CHECK([whether getopt has optreset support], + ac_cv_have_getopt_optreset, [ +- AC_TRY_LINK( +- [ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +- ], +- [ extern int optreset; optreset = 0; ], +- [ ac_cv_have_getopt_optreset="yes" ], +- [ ac_cv_have_getopt_optreset="no" ] +- ) ++ ]], [[ extern int optreset; optreset = 0; ]])],[ ac_cv_have_getopt_optreset="yes" ],[ ac_cv_have_getopt_optreset="no" ++ ]) + ]) + if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then + AC_DEFINE(HAVE_GETOPT_OPTRESET) + fi + + AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ +- AC_TRY_LINK([], +- [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], +- [ ac_cv_libc_defines_sys_errlist="yes" ], +- [ ac_cv_libc_defines_sys_errlist="no" ] +- ) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])],[ ac_cv_libc_defines_sys_errlist="yes" ],[ ac_cv_libc_defines_sys_errlist="no" ++ ]) + ]) + if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then + AC_DEFINE(HAVE_SYS_ERRLIST) +@@ -1866,11 +1706,8 @@ + + + AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ +- AC_TRY_LINK([], +- [ extern int sys_nerr; printf("%i", sys_nerr);], +- [ ac_cv_libc_defines_sys_nerr="yes" ], +- [ ac_cv_libc_defines_sys_nerr="no" ] +- ) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern int sys_nerr; printf("%i", sys_nerr);]])],[ ac_cv_libc_defines_sys_nerr="yes" ],[ ac_cv_libc_defines_sys_nerr="no" ++ ]) + ]) + if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then + AC_DEFINE(HAVE_SYS_NERR) +@@ -1965,16 +1802,13 @@ + AC_DEFINE(KRB5) + KRB5_MSG="yes" + AC_MSG_CHECKING(whether we are using Heimdal) +- AC_TRY_COMPILE([ #include ], +- [ char *tmp = heimdal_version; ], +- [ AC_MSG_RESULT(yes) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ char *tmp = heimdal_version; ]])],[ AC_MSG_RESULT(yes) + AC_DEFINE(HEIMDAL) + K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken" +- ], +- [ AC_MSG_RESULT(no) ++ ],[ AC_MSG_RESULT(no) + K5LIBS="-lkrb5 -lk5crypto -lcom_err" +- ] +- ) ++ ++ ]) + if test ! -z "$need_dash_r" ; then + LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib" + fi +@@ -2083,13 +1917,14 @@ + ) + fi + fi ++if test "$cross_compiling" != yes; then + AC_CHECK_FILE("/dev/ptc", + [ + AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) + have_dev_ptc=1 + ] + ) +- ++fi + # Options from here on. Some of these are preset by platform above + AC_ARG_WITH(mantype, + [ --with-mantype=man|cat|doc Set man page type], +@@ -2148,14 +1983,12 @@ + + if test -z "$disable_shadow" ; then + AC_MSG_CHECKING([if the systems has expire shadow information]) +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + struct spwd sp; +- ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ], +- [ sp_expire_available=yes ], [] +- ) ++ ]], [[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ]])],[ sp_expire_available=yes ],[ ++ ]) + + if test "x$sp_expire_available" = "xyes" ; then + AC_MSG_RESULT(yes) +@@ -2183,7 +2016,9 @@ + fi + + # check for /etc/default/login and use it if present. ++if test "x$cross_compiling" != "xyes"; then + AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ]) ++fi + + if test "x$external_path_file" = "x/etc/default/login"; then + AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) +@@ -2222,8 +2057,7 @@ + If PATH is defined in $external_path_file, ensure the path to scp is included, + otherwise scp will not work.]) + fi +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + /* find out what STDPATH is */ + #include + #ifdef HAVE_PATHS_H +@@ -2255,10 +2089,8 @@ + + exit(0); + } +- ], [ user_path=`cat conftest.stdpath` ], +- [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], +- [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] +- ) ++ ]])],[ user_path=