1dnl This is the newlib/libc/sys/linux configure.in file.
2dnl Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.5)
5AC_INIT(linux.c)
6
7dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
8AC_CONFIG_AUX_DIR(../../../..)
9
10NEWLIB_CONFIGURE(../../..)
11
12dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
13dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
14dnl line of the macro which fail because appropriate LDFLAGS are not set.
15
16if test "${use_libtool}" = "yes"; then
17AC_LIBTOOL_WIN32_DLL
18AM_PROG_LIBTOOL
19AC_PROG_AWK
20fi
21
22LINUX_MACH_LIB=
23if test -n "${machine_dir}"; then
24  if test "${use_libtool}" = "yes"; then
25    LINUX_MACH_LIB=machine/${machine_dir}/liblinux${machine_dir}.${aext}
26  else
27    LINUX_MACH_LIB=machine/lib.${aext}
28  fi
29fi
30AC_SUBST(LINUX_MACH_LIB)
31
32EXTRA_SUBDIRS=
33EXTRA_SUBLIBS=
34
35if test "${newlib_multithread}" = "yes"; then
36EXTRA_CONFIG_DIRS=linuxthreads
37fi
38if test "x${newlib_elix_level}" = "x1"; then
39EXTRA_SUBDIRS=linuxthreads net
40else
41EXTRA_SUBDIRS="linuxthreads net intl stdlib iconv dl"
42EXTRA_SUBLIBS="net/libnet.la intl/libintl.la stdlib/libstdlib.la iconv/libiconv.la dl/libdl.la"
43fi
44
45AC_SUBST(EXTRA_SUBDIRS)
46AC_SUBST(EXTRA_SUBLIBS)
47
48AC_CONFIG_SUBDIRS(machine $EXTRA_CONFIG_DIRS)
49
50AC_OUTPUT(Makefile intl/Makefile net/Makefile stdlib/Makefile iconv/Makefile dl/Makefile cmath/Makefile argp/Makefile)
51