dnl Checks for libraries.
-AC_SEARCH_LIBS(cos, m)
-
dnl Thread related checks
AC_CHECK_HEADER(pthread.h)
AC_CHECK_LIB(pthread, pthread_exit)
AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes")
+thread_LIBS="$LIBS"
+LIBS=""
+dnl search for network related libraries
AC_SEARCH_LIBS(inet_addr, xnet)
AC_SEARCH_LIBS(socket, socket)
+network_LIBS="$LIBS"
+LIBS=""
+
+dnl check for some default libraries
+AC_SEARCH_LIBS(cos, m)
+
+base_LIBS="$LIBS"
+LIBS=""
+
dnl check for glut location
AC_CHECK_HEADER(GL/glut.h)
if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
fi
fi
-base_LIBS="$LIBS"
-LIBS=""
-
dnl check for OpenGL related libraries
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
AC_SUBST(base_LIBS)
AC_SUBST(opengl_LIBS)
+AC_SUBST(thread_LIBS)
+AC_SUBST(network_LIBS)
dnl Check for MS Windows environment
AC_CHECK_HEADER(windows.h)
$(top_builddir)/simgear/bucket/libsgbucket.a \
$(top_builddir)/simgear/misc/libsgmisc.a \
$(top_builddir)/simgear/xml/libsgxml.a \
- -lplibnet -lplibul -lz
+ -lplibnet -lplibul -lz \
+ $(network_LIBS)
tcp_client_SOURCES = tcp_client.cxx
$(top_builddir)/simgear/bucket/libsgbucket.a \
$(top_builddir)/simgear/misc/libsgmisc.a \
$(top_builddir)/simgear/xml/libsgxml.a \
- -lplibnet -lplibul -lz
+ -lplibnet -lplibul -lz \
+ $(network_LIBS)
socktest_SOURCES = socktest.cxx
$(top_builddir)/simgear/debug/libsgdebug.a \
$(top_builddir)/simgear/misc/libsgmisc.a \
$(top_builddir)/simgear/xml/libsgxml.a \
- -lplibnet -lplibul -lz
+ -lplibnet -lplibul -lz \
+ $(network_LIBS)
lowtest_SOURCES = lowtest.cxx