blob: aa604dc01316bbab5b1e545ea90f7f1032dc3e83 [file] [log] [blame]
#!/bin/sh
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
# Disable localized program messages.
LC_ALL=C
export LC_ALL
# Stop on error exit status.
set -e
# Stop on uninitialized variable.
set -u
# Initialize variables with null values if they are not defined.
CFLAGS=${CFLAGS=}
NXT_TEST_CFLAGS=${NXT_TEST_CFLAGS=}
NXT_TEST_LIBS=${NXT_TEST_LIBS=}
# Initialize variables with default if they are not defined.
CC=${CC:-cc}
NXT_CFLAGS=${NXT_CFLAGS=}
NXT_CC_OPT=${NXT_CC_OPT:--O}
NXT_LD_OPT=${NXT_CC_OPT:--O}
NXT_BUILD_DIR=${NXT_BUILD_DIR:-build}
NXT_AUTOTEST=$NXT_BUILD_DIR/autotest
NXT_AUTOCONF_ERR=$NXT_BUILD_DIR/autoconf.err
NXT_AUTO_CONFIG_H=$NXT_BUILD_DIR/nxt_auto_config.h
NXT_MAKEFILE=$NXT_BUILD_DIR/Makefile
test -d $NXT_BUILD_DIR || mkdir $NXT_BUILD_DIR
> $NXT_AUTOCONF_ERR
cat << END > $NXT_AUTO_CONFIG_H
/* This file is auto-generated by configure */
END
NXT_LIBRT=
. auto/os
. auto/clang
. auto/time
. auto/memalign
. auto/getrandom
. auto/explicit_bzero
. auto/pcre
. auto/editline
. auto/sources
NXT_LIB_AUX_CFLAGS="$NXT_PCRE_CFLAGS"
NXT_LIBS="$NXT_LIBRT"
NXT_LIB_AUX_LIBS="$NXT_PCRE_LIB"
. auto/make
. auto/expect