Ignore:
Timestamp:
Feb 9, 2011, 3:20:07 PM (9 years ago)
Author:
sam
Message:

Stop using pkg-config in Makefiles and stop putting things in LDADD that
require to appear before LDFLAGS in the linker call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r421 r623  
    2323AC_C_INLINE
    2424
     25dnl Ensure an error is thrown if pkg-config M4 files are not found.
     26m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
     27m4_pattern_forbid([^PKG_CHECK_MODULES$])
     28m4_pattern_forbid([^PKG_PROG_PKG_CONFIG$])
     29
     30dnl Do not use PKG_CONFIG_LIBDIR when cross-compiling.
     31if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
     32  export PKG_CONFIG_LIBDIR=/dev/null
     33fi
     34
    2535dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
    2636dnl now otherwise it might be set in an obscure if statement. Same thing for
     
    2838AC_EGREP_CPP(yes, foo)
    2939PKG_PROG_PKG_CONFIG()
    30 m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
    31 if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
    32   export PKG_CONFIG_LIBDIR=/dev/null
    33 fi
    3440
    3541dnl conditional builds
     
    7480
    7581
    76 # Use libcaca? (required for font generation)
     82dnl Use libcaca? (required for font generation)
    7783ac_cv_my_have_caca="no"
    7884PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17, [ac_cv_my_have_caca="yes"], [:])
     
    8389
    8490
    85 # Use libpipi? (required for video recording)
     91dnl Use libpipi? (required for video recording)
    8692ac_cv_my_have_pipi="no"
    8793PKG_CHECK_MODULES(PIPI, pipi, [ac_cv_my_have_pipi="yes"], [:])
     
    9298
    9399
     100dnl Use GTK+? (required for the deushax editor)
     101GTK_CFLAGS="$GTK_CFLAGS `pkg-config --cflags gtk+-2.0 gtkgl-2.0`"
     102GTK_LIBS="$GTK_LIBS `pkg-config --libs gtk+-2.0 gtkgl-2.0`"
     103
    94104# How to use the Lol Engine inside this tree
    95 LOL_CFLAGS="-I \$(top_srcdir)/src `pkg-config --cflags sdl gl SDL_image`"
    96 LOL_LIBS="`pkg-config --libs sdl gl SDL_image` -lSDL_mixer"
     105LOL_CFLAGS="$LOL_CFLAGS -I \$(top_srcdir)/src `pkg-config --cflags sdl gl SDL_image`"
     106LOL_LIBS="$LOL_LIBS `pkg-config --libs sdl gl SDL_image` -lSDL_mixer"
    97107
    98108if test "${enable_release}" = "yes"; then
     
    101111
    102112AC_SUBST(MATH_LIBS)
     113AC_SUBST(GTK_CFLAGS)
     114AC_SUBST(GTK_LIBS)
    103115AC_SUBST(LOL_CFLAGS)
    104116AC_SUBST(LOL_LIBS)
Note: See TracChangeset for help on using the changeset viewer.