Twolame need -DLIBTWOLAME_STIC under win32 to use the .a
authorChristophe Mutricy <xtophe@videolan.org>
Fri, 12 Jan 2007 12:38:23 +0000 (12:38 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Fri, 12 Jan 2007 12:38:23 +0000 (12:38 +0000)
configure.ac
extras/contrib/src/Makefile

index 4fe5c87..da4c3c5 100644 (file)
@@ -3020,19 +3020,20 @@ then
       AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a)
       VLC_ADD_BUILTINS([twolame])
       VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a])
-      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame])
+      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame -DLIBTWOLAME_STATIC])
     else
       dnl  The given libtwolame wasn't built
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
     fi
   else
-    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame}"
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_twolame}"
     AC_CHECK_HEADERS(twolame.h, ,
       [ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
     AC_CHECK_LIB(twolame, twolame_init, [
       VLC_ADD_PLUGINS([twolame])
+      VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC])
       VLC_ADD_LDFLAGS([twolame],[-ltwolame]) ],
         [ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
     LDFLAGS="${LDFLAGS_save}"  
index faa05e6..a185d17 100644 (file)
@@ -1456,7 +1456,7 @@ endif
 ifdef HAVE_WIN32
        (cd twolame/win32; wget "http://twolame.svn.sourceforge.net/viewvc/*checkout*/twolame/trunk/win32/winutil.h")
 endif  
-       (cd twolame; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd libtwolame &&  make && make install)
+       (cd twolame; $(HOSTCC) CFLAGS="${CFLAGS}  -DLIBTWOLAME_STATIC" ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd libtwolame &&  make && make install)
        $(INSTALL_NAME)
        touch $@