summaryrefslogtreecommitdiff
path: root/libjava/configure.ac
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-07 09:44:22 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-07 09:44:22 +0000
commit20c1cf377d7a113bcc651950f46fb8be970e5176 (patch)
tree30f79a31f574b63638fff5bc2ed2b2c06060f48b /libjava/configure.ac
parent65b88e933befb87629e75b8f42e92a54f8f3fe52 (diff)
downloadgcc-20c1cf377d7a113bcc651950f46fb8be970e5176.tar.gz
* configure.ac (net/if.h check): Include sys/socket.h if present.
* configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/configure.ac')
-rw-r--r--libjava/configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/libjava/configure.ac b/libjava/configure.ac
index b2037d28152..42c84ec611e 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1568,9 +1568,17 @@ TL_AC_GXX_INCLUDE_DIR
# for now. If you change this, you also must update natFile.cc.
AC_CHECK_HEADERS([unistd.h bstring.h sys/time.h sys/types.h fcntl.h \
sys/ioctl.h sys/filio.h sys/stat.h sys/select.h \
- sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h \
+ sys/socket.h netinet/in.h arpa/inet.h netdb.h \
pwd.h sys/config.h stdint.h langinfo.h locale.h \
dirent.h sys/rw_lock.h magic.h ifaddrs.h])
+
+# sys/socket.h is a prerequisite for net/if.h on Solaris.
+AC_CHECK_HEADERS(net/if.h, [], [], [
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+])
+
AC_CHECK_HEADERS(inttypes.h, [
AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])