Changeset 623


Ignore:
Timestamp:
Feb 9, 2011, 3:20:07 PM (12 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.

Location:
trunk
Files:
4 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)
  • trunk/deushax/Makefile.am

    r221 r623  
    44deushax_SOURCES = deushax.cpp game.cpp game.h debugsprite.cpp debugsprite.h
    55deushax_CXXFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    6 deushax_LDADD = $(top_builddir)/src/liblol.a
    7 deushax_LDFLAGS = @LOL_LIBS@ @PIPI_LIBS@
     6deushax_LDADD =
     7deushax_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    88
    99editor_SOURCES = gtk/editor.cpp gtk/glmapview.cpp gtk/glmapview.h \
    1010                 mapviewer.cpp mapviewer.h
    11 editor_CXXFLAGS = @LOL_CFLAGS@ `pkg-config --cflags gtk+-2.0 gtkgl-2.0`
    12 editor_LDADD = $(top_builddir)/src/liblol.a
    13 editor_LDFLAGS = @LOL_LIBS@ `pkg-config --libs gtk+-2.0 gtkgl-2.0`
     11editor_CXXFLAGS = @GTK_CFLAGS@ @LOL_CFLAGS@
     12editor_LDADD =
     13editor_LDFLAGS = $(top_builddir)/src/liblol.a @GTK_LIBS@ @LOL_LIBS@
    1414EXTRA_DIST = gtk/editor.xml
    1515
  • trunk/monsterz/Makefile.am

    r424 r623  
    66    board.cpp board.h piece.cpp piece.h mash.cpp mash.h thumbs.cpp thumbs.h
    77monsterz_CXXFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    8 monsterz_LDADD = $(top_builddir)/src/liblol.a
    9 monsterz_LDFLAGS = @LOL_LIBS@ @PIPI_LIBS@
     8monsterz_LDADD =
     9monsterz_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    1010
    1111EXTRA_DIST = $(PNG) $(WAV)
  • trunk/src/Makefile.am

    r312 r623  
    1515    debugfps.cpp debugfps.h debugsphere.cpp debugsphere.h \
    1616    debugrecord.cpp debugrecord.h debugstats.cpp debugstats.h
    17 liblol_a_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image`
     17liblol_a_CXXFLAGS = @LOL_CFLAGS@
    1818
Note: See TracChangeset for help on using the changeset viewer.