OSDN Git Service

2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
[pf3gnuchains/pf3gnuchains4x.git] / newlib / libc / machine / m68k / aclocal.m4
index 70d4810..83a4258 100644 (file)
@@ -38,6 +38,15 @@ AC_ARG_ENABLE(target-optspace,
   *)   AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
  esac], [target_optspace=])dnl
 
+dnl Support --enable-malloc-debugging - currently only supported for Cygwin
+AC_ARG_ENABLE(malloc-debugging,
+[  --enable-malloc-debugging indicate malloc debugging requested],
+[case "${enableval}" in
+  yes) malloc_debugging=yes ;;
+  no)  malloc_debugging=no ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
+ esac], [malloc_debugging=])dnl
+
 dnl Support --enable-newlib-mb
 AC_ARG_ENABLE(newlib-mb,
 [  --enable-newlib-mb        enable multibyte support],
@@ -45,7 +54,66 @@ AC_ARG_ENABLE(newlib-mb,
   yes) newlib_mb=yes ;;
   no)  newlib_mb=no ;;
   *)   AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
- esac], [newlib_mb=no])dnl
+ esac], [newlib_mb=])dnl
+
+dnl Support --enable-newlib-iconv
+AC_ARG_ENABLE(newlib-iconv,
+[  --enable-newlib-iconv     enable iconv library support],
+[case "${enableval}" in
+  yes) newlib_iconv=yes ;;
+  no)  newlib_iconv=no ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
+ esac], [newlib_iconv=])dnl
+
+dnl Support --enable-newlib-builtin-converters
+AC_ARG_ENABLE(newlib-builtin-converters,
+[  --enable-newlib-builtin-converters   enable specific comma-separated list of iconv converters to be built-in],
+[if test x${enableval} = x; then
+   AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list)
+ fi
+ builtin_converters=${enableval}
+ ], [builtin_converters=])dnl
+
+dnl Support --enable-newlib-multithread
+AC_ARG_ENABLE(newlib-multithread,
+[  --enable-newlib-multithread        enable support for multiple threads],
+[case "${enableval}" in
+  yes) newlib_multithread=yes ;;
+  no)  newlib_multithread=no ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
+ esac], [newlib_multithread=yes])dnl
+
+dnl Support --enable-newlib-elix-level
+AC_ARG_ENABLE(newlib-elix-level,
+[  --enable-newlib-elix-level         supply desired elix library level (1-4)],
+[case "${enableval}" in
+  0)   newlib_elix_level=0 ;;
+  1)   newlib_elix_level=1 ;;
+  2)   newlib_elix_level=2 ;;
+  3)   newlib_elix_level=3 ;;
+  4)   newlib_elix_level=4 ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
+ esac], [newlib_elix_level=0])dnl
+
+dnl Support --disable-newlib-io-float
+AC_ARG_ENABLE(newlib-io-float,
+[  --disable-newlib-io-float disable printf/scanf family float support],
+[case "${enableval}" in
+  yes) newlib_io_float=yes ;;
+  no)  newlib_io_float=no ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
+ esac], [newlib_io_float=yes])dnl
+
+dnl Support --disable-newlib-supplied-syscalls
+AC_ARG_ENABLE(newlib-supplied-syscalls,
+[  --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
+[case "${enableval}" in
+  yes) newlib_may_supply_syscalls=yes ;;
+  no)  newlib_may_supply_syscalls=no ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
+ esac], [newlib_may_supply_syscalls=yes])dnl
+
+AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
 
 dnl We may get other options which we don't document:
 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
@@ -63,9 +131,9 @@ else
 fi
 AC_SUBST(newlib_basedir)
 
-AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE(newlib, 1.8.1)
+AM_INIT_AUTOMAKE(newlib, 1.11.0)
 
 # 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
@@ -107,12 +175,6 @@ fi
 
 LIB_AC_PROG_CC
 
-# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
-# run it explicitly here, it will be run implicitly before
-# NEWLIB_CONFIGURE, which doesn't work because that means that it will
-# be run before AC_CANONICAL_HOST.
-AC_CANONICAL_BUILD
-
 AC_CHECK_TOOL(AS, as)
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
@@ -134,23 +196,31 @@ fi
 
 . [$]{newlib_basedir}/configure.host
 
-case [$]{newlib_basedir} in
-/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
-*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
-esac
-
-newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
-case "${host}" in
-  *-*-cygwin*)
-    newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include  -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
-    ;;
-esac
-
 newlib_cflags="[$]{newlib_cflags} -fno-builtin"
 
 NEWLIB_CFLAGS=${newlib_cflags}
 AC_SUBST(NEWLIB_CFLAGS)
 
+LDFLAGS=${ldflags}
+AC_SUBST(LDFLAGS)
+
+AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
+AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
+AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
+AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
+AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
+
+AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
+
+# Hard-code OBJEXT.  Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+AC_SUBST(OBJEXT)
+AC_SUBST(oext)
+AC_SUBST(aext)
+
+AC_SUBST(libm_machine_dir)
 AC_SUBST(machine_dir)
 AC_SUBST(sys_dir)
 ])
@@ -247,6 +317,19 @@ else
 fi
 AC_SUBST($1)])
 
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
 # Add --enable-maintainer-mode option to configure.
 # From Jim Meyering
 
@@ -267,16 +350,3 @@ AC_DEFUN(AM_MAINTAINER_MODE,
 ]
 )
 
-# Define a conditional.
-
-AC_DEFUN(AM_CONDITIONAL,
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi])
-