Changeset 54f51353c358470dbdf0d6c6923c51407df09f06

Show
Ignore:
Timestamp:
11/26/05 19:53:59 (3 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1133031239 +0000
git-parent:

[e45f20e71f6e8959d599bd25e2d072855e556827]

git-author:
Clément Stenac <zorglub@videolan.org> 1133031239 +0000
Message:

* vlc-config:

  • Fix optarg parsing
  • Set ${libs} after the main loop to get the right exec prefix
  • Give -lvlc_pic if we want PIC

* Java bindings build

  • Use vlc-config better
  • Use pic for building
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bindings/java/Makefile.am

    r53e8222 r54f5135  
    1818 
    1919# Compile flags 
    20 CXXFLAGS += `top_builddir=../.. ../../vlc-config --cflags` -I../../ -I ../../include ${JINCLUDES} 
    21 LDFLAGS += -L../../lib -lvlc_pic -fPIC  `top_builddir=../.. ../../vlc-config --libs builtin pic` 
     20CXXFLAGS += `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include ${JINCLUDES} 
     21LDFLAGS += -L../../lib -lvlc_pic `top_builddir=../.. ../../vlc-config --libs builtin vlc pic` 
    2222 
    2323# Build targets 
    2424all: libjvlc.so VlcClient 
    2525 
    26 # FIXME: -ldbus-1 and -lhal are UGLY 
    27 # Problem is vlc-config --libs builtin does not output what is needed to build 
    28 # vlc. We need to clean up vlc-config first 
    2926libjvlc.so: vlc-glue-jni.o vlc-graphics-jni.o 
    30     $(CXX) -ldbus-1 -lhal -shared vlc-glue-jni.o vlc-graphics-jni.o $(LIBJINCLUDES) ${LDFLAGS} -o libjvlc.so 
     27    $(CXX) -shared vlc-glue-jni.o vlc-graphics-jni.o $(LIBJINCLUDES) ${LDFLAGS} -o libjvlc.so 
    3128 
    3229vlc-graphics-jni.o: VlcClient 
  • vlc-config.in.in

    r41e197b r54f5135  
    8989includes="${includes}" 
    9090cppflags="${includes}" 
    91 libs="-L@libdir@" 
    9291module="" 
    9392linkage="c" 
     
    145144while test $# -gt 0; do 
    146145  case "$1" in 
    147   -*=*) optarg=`echo "$1" | sed 's/-_a-zA-Z0-9*=//'` ;; 
     146  -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9\-]*=//'` ;; 
    148147  *) optarg= ;; 
    149148  esac 
     
    212211    external) 
    213212      echo_external=yes 
    214       ldflags="${ldflags} -lvlc" 
     213      if test "x${echo_pic}" = "xno" 
     214      then 
     215        ldflags="${ldflags} -lvlc" 
     216      else 
     217        ldflags="${ldflags} -lvlc_pic" 
     218      fi 
    215219      ;;       
    216220    *) 
     
    227231  shift 
    228232done 
     233 
     234libs="-L@libdir@" 
    229235 
    230236# 
     
    305311  echo "${cppflags} ${objcflags}" 
    306312fi 
     313 
     314# Libs 
     315# There are 4 possibilities 
     316#  - We are a plugin or a builtin 
     317#  - We are building from the outside (external): 
     318#   - Give full libvlc linkflags + -lvlc(_pic) (in libdir) 
     319#   - Link with builtins in libdir 
     320#  - We are building something from the inside (builtin) 
     321#       - Link with builtins in place 
     322#  If you want something shared from the inside (binding), 
     323#  you need "builtin vlc pic" 
    307324if test "${echo_libs}" = yes; then 
    308325  if test "${echo_builtin}" = yes; then