diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b50e862..c3e2f7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,6 +466,7 @@ elseif(UNIX) # OGG add_custom_command(OUTPUT ${CMAKE_CURRENT_LIST_DIR}/ogg/src/.libs/libogg.a COMMAND make clean || true + COMMAND ./autogen.sh COMMAND ${CROSS_COMPILE32_FLAGS} ./configure && make WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/ogg ) @@ -476,18 +477,13 @@ elseif(UNIX) set(OGG_BUNDLED_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/ogg/include") # OGG Vorbis File - if(CROSS_COMPILE32) - set(CFLAGS "-m32 -I${CMAKE_CURRENT_LIST_DIR}/ogg/include") - set(LDFLAGS "-m32 -L${CMAKE_CURRENT_LIST_DIR}/ogg/src/.libs") - else() - set(CFLAGS "-I${CMAKE_CURRENT_LIST_DIR}/ogg/include") - set(LDFLAGS "-L${CMAKE_CURRENT_LIST_DIR}/ogg/src/.libs") - endif() + set(CFLAGS "${CFLAGS} -I${CMAKE_CURRENT_LIST_DIR}/ogg/include") + set(LDFLAGS "${LDFLAGS} -L${CMAKE_CURRENT_LIST_DIR}/ogg/src/.libs") add_custom_command( OUTPUT ${CMAKE_CURRENT_LIST_DIR}/vorbis/lib/.libs/libvorbisfile.a COMMAND make clean || true - COMMAND eval \"CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} ./configure --disable-oggtest && make\" + COMMAND ${CROSS_COMPILE32_FLAGS} ./configure --disable-oggtest && make WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/vorbis ) add_custom_target(bundled_ogg_vorbis_file diff --git a/ogg/Makefile.am b/ogg/Makefile.am index 8bfe3030..9c8bece7 100644 --- a/ogg/Makefile.am +++ b/ogg/Makefile.am @@ -12,6 +12,8 @@ m4data_DATA = ogg.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ogg.pc +ACLOCAL_AMFLAGS = -I m4 + EXTRA_DIST = README.md AUTHORS CHANGES COPYING \ libogg.spec libogg.spec.in \ ogg.m4 ogg.pc.in ogg-uninstalled.pc.in \ diff --git a/ogg/configure.ac b/ogg/configure.ac index e146d075..dd26d7a3 100644 --- a/ogg/configure.ac +++ b/ogg/configure.ac @@ -3,6 +3,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([libogg],[1.3.2],[ogg-dev@xiph.org]) AC_CONFIG_SRCDIR(src/framing.c) +AC_CONFIG_MACRO_DIRS([m4]) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE([enable])