[DVDnav-discuss] r874 - in trunk/libdvdnav: Makefile configure2

nicodvb subversion at mplayerhq.hu
Mon Apr 16 22:49:16 CEST 2007


Author: nicodvb
Date: Mon Apr 16 22:49:16 2007
New Revision: 874

Modified:
   trunk/libdvdnav/Makefile
   trunk/libdvdnav/configure2

Log:
added options to specify cc, make, ldflags, cflags, optimizations and disable-strip;
also unbound --disable-debug from -strip; patch by Diego Petteno' (flameeyes gmail com)


Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile	(original)
+++ trunk/libdvdnav/Makefile	Mon Apr 16 22:49:16 2007
@@ -4,8 +4,6 @@ include config.mak
 
 .SUFFIXES: .so
 
-MAKE=make
-CC=gcc
 AR=ar
 LD=ld
 RANLIB=ranlib
@@ -38,7 +36,7 @@ LIB = $(L).a
 SHLIB = $(L).so
 
 
-CFLAGS += -g -Wall -funsigned-char -O3
+CFLAGS += -g -Wall -funsigned-char
 CFLAGS += -I$(CURDIR) -I$(CURDIR)/src -I$(CURDIR)/src/vm \
 	 -I$(CURDIR)/src/dvdread
 

Modified: trunk/libdvdnav/configure2
==============================================================================
--- trunk/libdvdnav/configure2	(original)
+++ trunk/libdvdnav/configure2	Mon Apr 16 22:49:16 2007
@@ -3,6 +3,9 @@
 dvdnav_sh_version=4.1.1
 dvdnav_sh_major=`echo $dvdnav_sh_version | awk -F. '{print $1}'`
 
+cc=gcc
+make=make
+
 show_help(){
   echo "Usage: configure [options]"
   echo "Options: [defaults in brackets after descriptions]"
@@ -17,7 +20,14 @@ show_help(){
   echo "  --disable-static         do not build static libraries [default=no]"
   echo "  --enable-shared          build shared libraries [default=no]"
   echo "  --disable-shared         do not build shared libraries [default=yes]"
-  echo "  --enable-debug           install with debugging symbols [default=no]"
+  echo "Advanced options (experts only):"
+  echo "  --cc=CC                  use C compiler CC [$cc]"
+  echo "  --make=MAKE              use specified make [$make]"
+  echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS"
+  echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS"
+  echo "Developer options:"
+  echo "  --disable-strip          disable stripping of executables and shared libraries"
+  echo "  --disable-opts           disable compiler optimizations"
   exit 1
 }
 
@@ -25,12 +35,11 @@ SHARED=yes
 STATIC=yes
 PREFIX=/usr/local/
 INSTALLSTRIP=-s
+optimizations="-O3"
 
 for opt do
   optval="${opt#*=}"
   case "$opt" in
-  --enable-debug) INSTALLSTRIP=
-  ;;
   --enable-shared) SHARED=yes
   ;;
   --disable-shared) SHARED=no
@@ -47,6 +56,18 @@ for opt do
   ;;
   --incdir=*) incdir="$optval"
   ;;
+  --cc=*) cc="$optval"
+  ;;
+  --make=*) make="$optval"
+  ;;
+  --extra-cflags=*) cflags="$cflags $optval"
+  ;;
+  --extra-ldflags=*) ldflags="$ldflags $optval"
+  ;;
+  --disable-strip) INSTALLSTRIP=
+  ;;
+  --disable-opts) optimizations=""
+  ;;
   --help) show_help
   ;;
   esac
@@ -68,6 +89,10 @@ BUILD_SHARED=$SHARED
 BUILD_STATIC=$STATIC
 SHLIB_VERSION=$dvdnav_sh_version
 SHLIB_MAJOR=$dvdnav_sh_major
+CC=$cc
+MAKE=$make
+CFLAGS=$optimizations $cflags
+LDFLAGS=$ldflags
 INSTALLSTRIP=$INSTALLSTRIP
 EOF
 



More information about the DVDnav-discuss mailing list