forked from lix-project/lix
* On Cygwin, set the system type to i686-cygwin, and disable dynamic
linking.
This commit is contained in:
parent
bb84984f3f
commit
2d456fc35a
30
configure.ac
30
configure.ac
|
@ -22,6 +22,7 @@ AC_PREFIX_DEFAULT(/nix)
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
|
||||||
# Construct a Nix system name (like "i686-linux").
|
# Construct a Nix system name (like "i686-linux").
|
||||||
AC_MSG_CHECKING([for the canonical Nix system name])
|
AC_MSG_CHECKING([for the canonical Nix system name])
|
||||||
cpu_name=$(uname -p | tr 'A-Z ' 'a-z_')
|
cpu_name=$(uname -p | tr 'A-Z ' 'a-z_')
|
||||||
|
@ -39,6 +40,13 @@ case $machine_name in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
sys_name=$(uname -s | tr 'A-Z ' 'a-z_')
|
sys_name=$(uname -s | tr 'A-Z ' 'a-z_')
|
||||||
|
|
||||||
|
case $sys_name in
|
||||||
|
cygwin*)
|
||||||
|
sys_name=cygwin
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
|
AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
|
||||||
[platform identifier (e.g., `i686-linux')]),
|
[platform identifier (e.g., `i686-linux')]),
|
||||||
system=$withval, system="${machine_name}-${sys_name}")
|
system=$withval, system="${machine_name}-${sys_name}")
|
||||||
|
@ -46,14 +54,27 @@ AC_MSG_RESULT($system)
|
||||||
AC_SUBST(system)
|
AC_SUBST(system)
|
||||||
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
|
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
|
||||||
|
|
||||||
|
|
||||||
|
# Windows-specific stuff.
|
||||||
|
if test "$sys_name" = "cygwin"; then
|
||||||
|
# We cannot delete open files.
|
||||||
|
AC_DEFINE(CANNOT_DELETE_OPEN_FILES, 1, [Whether it is impossible to delete open files.])
|
||||||
|
|
||||||
|
# Shared libraries don't work, currently.
|
||||||
|
AC_DISABLE_SHARED
|
||||||
|
AC_ENABLE_STATIC
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_RANLIB
|
|
||||||
|
|
||||||
# We are going to use libtool.
|
# We are going to use libtool.
|
||||||
AC_DISABLE_STATIC
|
AC_DISABLE_STATIC
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
|
||||||
# Check for pubsetbuf.
|
# Check for pubsetbuf.
|
||||||
AC_MSG_CHECKING([for pubsetbuf])
|
AC_MSG_CHECKING([for pubsetbuf])
|
||||||
AC_LANG_PUSH(C++)
|
AC_LANG_PUSH(C++)
|
||||||
|
@ -65,11 +86,13 @@ static char buf[1024];]],
|
||||||
AC_MSG_RESULT(no))
|
AC_MSG_RESULT(no))
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
|
|
||||||
|
|
||||||
# Check for <locale>
|
# Check for <locale>
|
||||||
AC_LANG_PUSH(C++)
|
AC_LANG_PUSH(C++)
|
||||||
AC_CHECK_HEADERS([locale])
|
AC_CHECK_HEADERS([locale])
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([NEED_PROG],
|
AC_DEFUN([NEED_PROG],
|
||||||
[
|
[
|
||||||
AC_PATH_PROG($1, $2)
|
AC_PATH_PROG($1, $2)
|
||||||
|
@ -181,14 +204,17 @@ AC_SUBST(bzip2_include)
|
||||||
AC_SUBST(bzip2_bin)
|
AC_SUBST(bzip2_bin)
|
||||||
AC_SUBST(bzip2_bin_test)
|
AC_SUBST(bzip2_bin_test)
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_LIB(pthread, pthread_mutex_init)
|
AC_CHECK_LIB(pthread, pthread_mutex_init)
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],
|
AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],
|
||||||
[do not initialise DB etc. in `make install']),
|
[do not initialise DB etc. in `make install']),
|
||||||
init_state=$enableval, init_state=yes)
|
init_state=$enableval, init_state=yes)
|
||||||
AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes")
|
AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes")
|
||||||
|
|
||||||
|
|
||||||
|
# Setuid installations.
|
||||||
AC_ARG_ENABLE(setuid, AC_HELP_STRING([--enable-setuid],
|
AC_ARG_ENABLE(setuid, AC_HELP_STRING([--enable-setuid],
|
||||||
[install Nix setuid]),
|
[install Nix setuid]),
|
||||||
setuid_hack=$enableval, setuid_hack=no)
|
setuid_hack=$enableval, setuid_hack=no)
|
||||||
|
@ -219,7 +245,7 @@ AC_DEFINE_UNQUOTED(NIX_GROUP, ["$NIX_GROUP"], [Nix group])
|
||||||
# This is needed if ATerm, Berkeley DB or bzip2 are static libraries,
|
# This is needed if ATerm, Berkeley DB or bzip2 are static libraries,
|
||||||
# and the Nix libraries are dynamic.
|
# and the Nix libraries are dynamic.
|
||||||
if test "$(uname)" = "Darwin"; then
|
if test "$(uname)" = "Darwin"; then
|
||||||
LDFLAGS="-all_load $LDFLAGS"
|
LDFLAGS="-all_load $LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue