Browse Source

Certain configure scripts test for presence of dlfcn.h. Don't install it
if !HAVE_SHARED.

Bernd Schmidt 16 years ago
parent
commit
640cb909d1
2 changed files with 7 additions and 0 deletions
  1. 5 0
      Makefile.in
  2. 2 0
      include/link.h

+ 5 - 0
Makefile.in

@@ -196,6 +196,11 @@ ifneq ($(UCLIBC_HAS_THREADS),y)
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
 endif
+ifneq ($(HAVE_SHARED),y)
+	# Remove dlfcn header if we don't have shared libraries.
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h
+endif
 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
 	# Remove this as it is only used internally.
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h

+ 2 - 0
include/link.h

@@ -23,7 +23,9 @@
 
 #include <features.h>
 #include <elf.h>
+#ifndef __HAVE_NO_SHARED__
 #include <dlfcn.h>
+#endif
 #include <sys/types.h>
 #if defined _LIBC && defined __UCLIBC_HAS_THREADS_NATIVE__
 #include <tls.h>