From: curt Date: Wed, 4 Nov 1998 23:01:04 +0000 (+0000) Subject: Changes to the automake/autoconf system to reduce the number of libraries X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=59285ca41e2feb8eedb7c665975261902d0213dc;p=flightgear.git Changes to the automake/autoconf system to reduce the number of libraries that are unnecessarily linked into the various executables. --- diff --git a/Thanks b/Thanks index 3e0d514b8..13d1b5a6f 100644 --- a/Thanks +++ b/Thanks @@ -41,7 +41,8 @@ Jim Brennan Bernie Bright - Many C++ style, usage, and implimentation improvements. + Many C++ style, usage, and implimentation improvements. STL portability, + tons o' stuff. :-) Bernhard H. Buckel diff --git a/configure.in b/configure.in index a2bbbddab..ae3d2d1c9 100644 --- a/configure.in +++ b/configure.in @@ -80,14 +80,9 @@ AM_CONDITIONAL(ENABLE_IRIX_AUDIO, test -r /usr/include/audio.h) AM_CONDITIONAL(ENABLE_WIN32_AUDIO, test "x$ac_cv_header_windows_h" = "xyes") dnl Check for (currently Linux only style) joystick support -# AM_CONDITIONAL(ENABLE_JOYSTICK_SUPPORT, \ -# test -r /usr/include/linux/joystick.h \ -# -o "x$ac_cv_header_windows_h" = "xyes" ) AM_CONDITIONAL(ENABLE_LINUX_JOYSTICK, test -r /usr/include/linux/joystick.h ) -# AM_CONDITIONAL(ENABLE_GLUT_JOYSTICK, "x$ac_cv_header_windows_h" = "xyes" ) - dnl extra library and include directories EXTRA_DIRS="/usr/local /usr/X11R6 /opt/X11R6" @@ -103,8 +98,14 @@ AC_PATH_XTRA dnl Checks for libraries. +null_LIBS="$LIBS" + AC_CHECK_LIB(m, cos) -AC_CHECK_LIB(socket, socket) + +base_LIBS="$LIBS" +LIBS="$null_LIBS" + +# AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(X11, XCreateWindow) AC_CHECK_LIB(Xext, XShmCreateImage) AC_CHECK_LIB(Xi, XGetExtensionVersion) @@ -150,8 +151,11 @@ if test "x$ac_cv_header_windows_h" != "xyes" ; then dnl check for glut AC_CHECK_LIB(glut, glutGetModifiers) - dnl test for glutGameModeString + dnl test for glutGameModeString, but avoid adding glut a second time into + dnl the list of libraries + save_LIBS="$LIBS" AC_CHECK_LIB(glut, glutGameModeString) + LIBS="$save_LIBS" else dnl Win32 is a little wierd because it has to try to handle the various dnl winbloze-isms. We'll just do this manually for now. @@ -204,6 +208,13 @@ else ac_cv_lib_glut_glutGameModeString="yes" fi +opengl_LIBS="$LIBS" +LIBS="$null_LIBS" + +AC_SUBST(base_LIBS) +AC_SUBST(opengl_LIBS) + + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS( \ @@ -294,3 +305,4 @@ AC_OUTPUT( \ ) AC_OUTPUT_COMMANDS([chmod 755 Simulator/Main/runfgfs]) +