diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 939fda8..4aeeae0 100644 --- a/configure.in +++ b/configure.in @@ -837,7 +837,7 @@ cat > conftest.c <<\EOF foo () { } EOF dnl -if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep '$foo..ng' > /dev/null]); +if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null]); then libc_cv_gcc_alpha_ng_prefix=yes else @@ -857,8 +857,14 @@ AC_CACHE_CHECK(for DWARF2 unwind info support, libc_cv_gcc_dwarf2_unwind_info, static char __EH_FRAME_BEGIN__[]; _start () { +#ifdef CHECK__register_frame __register_frame (__EH_FRAME_BEGIN__); __deregister_frame (__EH_FRAME_BEGIN__); +#endif +#ifdef CHECK__register_frame_info + __register_frame_info (__EH_FRAME_BEGIN__); + __deregister_frame_info (__EH_FRAME_BEGIN__); +#endif } int __eh_pc; __throw () {} @@ -873,17 +879,32 @@ abort () {} __bzero () {} EOF dnl No \ in command here because it ends up inside ''. -if AC_TRY_COMMAND([${CC-cc} $CFLAGS +if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&AC_FD_CC]); then - libc_cv_gcc_dwarf2_unwind_info=yes + libc_cv_gcc_dwarf2_unwind_info=static else libc_cv_gcc_dwarf2_unwind_info=no fi +if test $libc_cv_gcc_dwarf2_unwind_info = no; then + if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame + -nostdlib -nostartfiles + -o conftest conftest.c -lgcc >&AC_FD_CC]); then + libc_cv_gcc_dwarf2_unwind_info=yes + else + libc_cv_gcc_dwarf2_unwind_info=no + fi +fi rm -f conftest*]) -if test $libc_cv_gcc_dwarf2_unwind_info = yes; then +case $libc_cv_gcc_dwarf2_unwind_info in +yes) AC_DEFINE(HAVE_DWARF2_UNWIND_INFO) -fi + ;; +static) + AC_DEFINE(HAVE_DWARF2_UNWIND_INFO) + AC_DEFINE(HAVE_DWARF2_UNWIND_INFO_STATIC) + ;; +esac ### End of automated tests. ### Now run sysdeps configure fragments. @@ -1024,10 +1045,23 @@ if test $shared = default; then fi fi +dnl We must not allow compilation without static library on some platforms. +if test $static = no && test $shared = yes; then + case "$host_os" in + linux* | gnu*) + AC_MSG_ERROR([ +*** You must compile with support for the static library since the shared +*** library uses it. Restart configure without \`--disable-static'.]) + ;; + *) + ;; + esac +fi + AC_CACHE_CHECK([whether -fPIC is default], pic_default, [pic_default=yes cat > conftest.c <<EOF -#if defined(__PIC__) || defined(__pic__) || defined(PIC) || defined(pic) +#if defined __PIC__ || defined __pic__ || defined PIC || defined pic # error PIC is default. #endif EOF |