diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2011-06-13 10:33:41 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2011-06-13 10:33:41 +0800 |
commit | 2fcd8df391e770d852ba7a4fb8f5f1c1f335ecb7 (patch) | |
tree | dd8fc73a7ca355dc49fa82f8c4c352839153cf0d | |
parent | 4676a2b33e529d896ea90da7d2ef63a788526fba (diff) |
More fixes for making fontconfig, sdl, opengl and opengles optional
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Makefile.am | 22 |
2 files changed, 23 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index b36c800..41f4c38 100644 --- a/configure.ac +++ b/configure.ac @@ -188,6 +188,9 @@ AC_ARG_ENABLE(opengl, if test "x$enable_opengl" != "xno"; then AX_CHECK_GL +else + no_gl=yes + no_x=yes fi AM_CONDITIONAL(HAVE_OPENGL, [test "x$no_gl" != x"yes" ]) AM_CONDITIONAL(HAVE_X, [test "x$no_x" != x"yes" ]) @@ -207,13 +210,12 @@ if test "x$enable_opengles" != "xno"; then AC_CHECK_HEADERS([EGL/egl.h GLES/gl.h]) save_LIBS="$LIBS" - other_egl_LIBS="" LIBS="$other_egl_LIBS $LIBS" for egl_lib in EGL egl13 egl12 egl11 egl; do AC_CHECK_LIB($egl_lib, eglGetError, EGL_LIBS="-l$egl_lib") done - LIBS="$EGL_LIBS $LIBS" + LIBS="$other_gles_LIBS $EGL_LIBS $LIBS" for gles1_lib in GLES_CM GLESv1_CM GLESv1; do AC_CHECK_LIB($gles1_lib, glGenTextures, [GLES_LIBS="-l$gles1_lib" diff --git a/src/Makefile.am b/src/Makefile.am index 9f0cdca..a731ad2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,18 +30,19 @@ libsdl_freetype_la_SOURCES = \ libsdl_freetype_la_LIBADD = $(FREETYPE_LIBS) $(SDL_LIBS) $(LIBM) libsdl_freetype_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined +if HAVE_FONTCONFIG libsdl_ft_la_SOURCES = \ sdl-ft.h \ sdl-ft.c libsdl_ft_la_LIBADD = $(FONTCONFIG_LIBS) libsdl-freetype.la libsdl_ft_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined +endif if HAVE_OPENGL libsdl_freetype_opengl = libsdl-freetype-opengl.la libsdl_freetype_opengl_headers = sdl-freetype-opengl.h libsdl_freetype_opengl_pc = sdl-freetype-opengl.pc -endif libsdl_freetype_opengl_la_SOURCES = \ sdl-freetype-opengl.h \ @@ -50,12 +51,12 @@ libsdl_freetype_opengl_la_SOURCES = \ libsdl_freetype_opengl_la_LIBADD = libsdl-freetype.la $(GL_LIBS) libsdl_freetype_opengl_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined libsdl_freetype_opengl_la_CFLAGS = $(GL_CFLAGS) $(AM_CFLAGS) +endif if HAVE_OPENGLES libsdl_freetype_opengles = libsdl-freetype-opengles.la libsdl_freetype_opengles_headers = sdl-freetype-opengles.h libsdl_freetype_opengles_pc = sdl-freetype-opengles.pc -endif libsdl_freetype_opengles_la_SOURCES = \ sdl-freetype-opengles.h \ @@ -64,6 +65,7 @@ libsdl_freetype_opengles_la_SOURCES = \ libsdl_freetype_opengles_la_LIBADD = libsdl-freetype.la $(GLES_LIBS) libsdl_freetype_opengles_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined libsdl_freetype_opengles_la_CFLAGS = $(GLES_CFLAGS) $(AM_CFLAGS) +endif if HAVE_SDL if HAVE_FONTCONFIG @@ -89,14 +91,23 @@ cache_test_SOURCES = cache-test.c cache_test_LDADD = libsdl-freetype.la font_test_SOURCES = font-test.c -font_test_LDADD = libsdl-ft.la +font_test_LDADD = libsdl-freetype.la +if HAVE_SDL +if HAVE_FONTCONFIG sdl_test_SOURCES = sdl-test.c sdl_test_LDADD = libsdl-ft.la +endif +endif +if HAVE_SDL +if HAVE_OPENGL sdl_opengl_test_SOURCES = sdl-opengl-test.c sdl_opengl_test_LDADD = libsdl-freetype-opengl.la libsdl-ft.la +endif +endif +if HAVE_OPENGLES gles_test_SOURCES = gles-test.c gles_test_LDADD = libsdl-freetype-opengles.la $(EGL_LIBS) if HAVE_FONTCONFIG @@ -104,7 +115,10 @@ gles_test_LDADD += libsdl-ft.la else gles_test_LDADD += libsdl-freetype.la endif +endif +if HAVE_SDL +if HAVE_OPENGL wrap_test_SOURCES = wrap-test.cpp wrap_test_LDADD = libsdl-freetype-opengl.la if HAVE_FONTCONFIG @@ -112,6 +126,8 @@ wrap_test_LDADD += libsdl-ft.la else wrap_test_LDADD += libsdl-freetype.la endif +endif +endif lib_LTLIBRARIES = \ libsdl-freetype.la \ |