summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-18 09:47:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-18 09:47:37 +0000
commit17795971fc6a5eca604200231e8fca443dabb9c6 (patch)
tree37df79a9b0ae668fd18757b7b33063577c2471b5 /autoconf
parent7c0afe04ab82962ebd78a203ee17a5545170ea7b (diff)
downloadllvm-17795971fc6a5eca604200231e8fca443dabb9c6.tar.gz
llvm-17795971fc6a5eca604200231e8fca443dabb9c6.tar.bz2
llvm-17795971fc6a5eca604200231e8fca443dabb9c6.tar.xz
Changes for testing presence of ltdl.h and lt_dlopen(), libtool functions
for cross-platform dynamic loading of shared objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac28
1 files changed, 19 insertions, 9 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 613c8a7feb..81806f6b9a 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -203,6 +203,7 @@ fi
dnl Checks for other tools
AC_PROG_FLEX
AC_PROG_BISON
+AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PATH_PROG(TAR,[tar],[gtar])
@@ -252,23 +253,32 @@ dnl Checks for libraries:
dnl libelf is for sparc only; we can ignore it if we don't have it
AC_CHECK_LIB(elf, elf_begin)
-dnl Check for bzip2 and zlib compression libraries needed for archive reading/writing
-AC_CHECK_LIB(bz2,BZ2_bzCompressInit,[bzip2_found=1],[bzip2_found=0])
-AC_CHECK_HEADERS([bzlib.h],[bzlib_h_found=1],[bzlib_h_found=0],[])
+dnl Check for bzip2 and zlib compression libraries needed for archive
+dnl and bytecode compression.
AC_CHECK_LIB(z,gzopen,[zlib_found=1],[zlib_found=0])
-AC_CHECK_HEADERS([zlib.h],[zlib_h_found=1],[zlib_h_found=0],[])
-if test $zlib_found -eq 1 -a $zlib_h_found -eq 1; then
- AC_DEFINE([HAVE_ZLIB],[1],[Define if zlib library is available on this platform.])
+if test $zlib_found -eq 1; then
+ AC_DEFINE([HAVE_ZLIB],[1],
+ [Define if zlib library is available on this platform.])
AC_SUBST([HAVE_ZLIB],[1])
else
AC_SUBST([HAVE_ZLIB],[0])
fi
-if test $bzip2_found -eq 1 -a $bzlib_h_found -eq 1 ; then
- AC_DEFINE([HAVE_BZIP2],[1],[Define if bzip2 library is available on this platform.])
+
+AC_CHECK_LIB(bz2,BZ2_bzCompressInit,[bzip2_found=1],[bzip2_found=0])
+if test $bzip2_found -eq 1 ; then
+ AC_DEFINE([HAVE_BZIP2],[1],
+ [Define if bzip2 library is available on this platform.])
AC_SUBST([HAVE_BZIP2],[1])
else
AC_SUBST([HAVE_BZIP2],[0])
fi
+
+dnl lt_dlopen may be required for plugin support.
+AC_SEARCH_LIBS(lt_dlopen,ltdl,AC_DEFINE([HAVE_LT_DLOPEN],[1],
+ [Define if lt_dlopen() is available on this platform]),
+ AC_MSG_WARN([lt_dlopen() not found - plugin support might
+ not be available]))
+
dnl dlopen() is required for plugin support.
AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],[Define if dlopen() is available on this platform.]),AC_MSG_WARN([dlopen() not found - disabling plugin support]))
@@ -287,7 +297,7 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
dnl Checks for POSIX and other various system-specific header files
-AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h malloc.h sys/mman.h sys/resource.h dlfcn.h link.h execinfo.h windows.h)
+AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h unistd.h malloc.h sys/mman.h sys/resource.h dlfcn.h ltdl.h link.h execinfo.h windows.h bzlib.h zlib.h])
dnl Check for things that need to be included in public headers, and so
dnl for which we may not have access to a HAVE_* preprocessor #define.