Split up into and . Fix a typo for FreeBSD. And do some Makefile cleanups
This commit is contained in:
parent
92ae2adeb1
commit
19d08953e3
3 changed files with 18 additions and 12 deletions
18
configure.ac
18
configure.ac
|
@ -198,8 +198,6 @@ esac
|
||||||
|
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
|
|
||||||
AC_SEARCH_LIBS(cos, m)
|
|
||||||
|
|
||||||
dnl Thread related checks
|
dnl Thread related checks
|
||||||
AC_CHECK_LIB(pthread, pthread_exit)
|
AC_CHECK_LIB(pthread, pthread_exit)
|
||||||
if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" \
|
if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" \
|
||||||
|
@ -210,7 +208,7 @@ if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" \
|
||||||
save_CXXFLAGS="$CXXFLAGS"
|
save_CXXFLAGS="$CXXFLAGS"
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CXXFLAGS="-pthread $CXXFLAGS"
|
CXXFLAGS="-pthread $CXXFLAGS"
|
||||||
CFLAGS="-pthread $FLAGS"
|
CFLAGS="-pthread $CFLAGS"
|
||||||
save_LIBS=$LIBS
|
save_LIBS=$LIBS
|
||||||
AC_CHECK_LIB(c_r, pthread_exit)
|
AC_CHECK_LIB(c_r, pthread_exit)
|
||||||
if test "x$ac_cv_lib_c_r_pthread_exit" != "xyes"; then
|
if test "x$ac_cv_lib_c_r_pthread_exit" != "xyes"; then
|
||||||
|
@ -220,13 +218,23 @@ if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" \
|
||||||
LIBS=$save_LIBS
|
LIBS=$save_LIBS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
thread_LIBS="$LIBS"
|
||||||
|
LIBS=""
|
||||||
|
|
||||||
|
dnl search for network related libraries
|
||||||
AC_SEARCH_LIBS(inet_addr, xnet)
|
AC_SEARCH_LIBS(inet_addr, xnet)
|
||||||
AC_SEARCH_LIBS(socket, socket)
|
AC_SEARCH_LIBS(socket, socket)
|
||||||
AC_SEARCH_LIBS(main, nsl)
|
AC_SEARCH_LIBS(main, nsl)
|
||||||
|
|
||||||
|
network_LIBS="$LIBS"
|
||||||
|
LIBS=""
|
||||||
|
|
||||||
|
dnl check for some default libraries
|
||||||
|
AC_SEARCH_LIBS(cos, m)
|
||||||
AC_SEARCH_LIBS(dlclose, dl)
|
AC_SEARCH_LIBS(dlclose, dl)
|
||||||
|
|
||||||
base_LIBS="$LIBS"
|
base_LIBS="$LIBS"
|
||||||
opengl_LIBS=""
|
LIBS=""
|
||||||
|
|
||||||
dnl check for glut location
|
dnl check for glut location
|
||||||
AC_CHECK_HEADER(GL/glut.h)
|
AC_CHECK_HEADER(GL/glut.h)
|
||||||
|
@ -312,6 +320,8 @@ LIBS="$base_LIBS"
|
||||||
|
|
||||||
AC_SUBST(base_LIBS)
|
AC_SUBST(base_LIBS)
|
||||||
AC_SUBST(opengl_LIBS)
|
AC_SUBST(opengl_LIBS)
|
||||||
|
AC_SUBST(thread_LIBS)
|
||||||
|
AC_SUBST(network_LIBS)
|
||||||
|
|
||||||
# The following are C++ items that need to be tested for with the c++
|
# The following are C++ items that need to be tested for with the c++
|
||||||
# compiler
|
# compiler
|
||||||
|
|
|
@ -5,20 +5,20 @@ WEATHER_LIBS = $(top_builddir)/src/Environment/libEnvironment.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_MPLAYER_AS
|
if ENABLE_MPLAYER_AS
|
||||||
MPLAYER_LIBS = $(top_builddir)/src/MultiPlayer/libMultiPlayer.a
|
MPLAYER_LIBS = $(top_builddir)/src/MultiPlayer/libMultiPlayer.a $(network_LIBS)
|
||||||
else
|
else
|
||||||
MPLAYER_LIBS =
|
MPLAYER_LIBS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_NETWORK_OLK
|
if ENABLE_NETWORK_OLK
|
||||||
NETWORK_LIBS = $(top_builddir)/src/NetworkOLK/libNetworkOLK.a
|
NETWORK_LIBS = $(top_builddir)/src/NetworkOLK/libNetworkOLK.a $(network_LIBS)
|
||||||
else
|
else
|
||||||
NETWORK_LIBS =
|
NETWORK_LIBS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
if WITH_THREADS
|
if WITH_THREADS
|
||||||
THREAD_LIBS = -lsgthreads
|
THREAD_LIBS = -lsgthreads $(thread_LIBS)
|
||||||
else
|
else
|
||||||
THREAD_LIBS =
|
THREAD_LIBS =
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,7 +3,6 @@ bin_PROGRAMS = est-epsilon gl-info
|
||||||
noinst_PROGRAMS = test-gethostname test-mktime test-text test-up test-env-map
|
noinst_PROGRAMS = test-gethostname test-mktime test-text test-up test-env-map
|
||||||
|
|
||||||
est_epsilon_SOURCES = est-epsilon.c
|
est_epsilon_SOURCES = est-epsilon.c
|
||||||
est_epsilon_LDADD = $(base_LIBS)
|
|
||||||
|
|
||||||
gl_info_SOURCES = gl-info.c
|
gl_info_SOURCES = gl-info.c
|
||||||
gl_info_LDADD = $(opengl_LIBS)
|
gl_info_LDADD = $(opengl_LIBS)
|
||||||
|
@ -12,13 +11,10 @@ test_env_map_SOURCES = test-env-map.cxx
|
||||||
test_env_map_LDADD = $(opengl_LIBS)
|
test_env_map_LDADD = $(opengl_LIBS)
|
||||||
|
|
||||||
test_gethostname_SOURCES = test-gethostname.cxx
|
test_gethostname_SOURCES = test-gethostname.cxx
|
||||||
test_gethostname_LDADD = $(base_LIBS)
|
|
||||||
|
|
||||||
test_mktime_SOURCES = test-mktime.cxx
|
test_mktime_SOURCES = test-mktime.cxx
|
||||||
test_mktime_LDADD = $(base_LIBS)
|
|
||||||
|
|
||||||
test_text_SOURCES = test-text.cxx
|
test_text_SOURCES = test-text.cxx
|
||||||
test_text_LDADD = $(base_LIBS)
|
|
||||||
|
|
||||||
test_up_SOURCES = test-up.cxx
|
test_up_SOURCES = test-up.cxx
|
||||||
test_up_LDADD = -lsgmath -lsgdebug -lplibsg -lplibul $(base_LIBS)
|
test_up_LDADD = -lsgmath -lsgdebug -lplibsg -lplibul
|
||||||
|
|
Loading…
Reference in a new issue