#!/bin/sh prefix=/usr/local exec_prefix=${prefix} exec_prefix_set=no moduledir=${exec_prefix}/lib/directfb-0.9.16 usage() { cat <[,]...] [--graphics=[,]...] [--font=[,]...] [--imageprovider=[,]...] [--videoprovider=[,]...] Libraries: directfb avifile EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi lib_directfb=yes lib_avifile=no while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo 0.9.16 ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; directfb) lib_directfb=yes ;; avifile) lib_avifile=yes ;; --input=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /'`; do echo_input="$echo_input -Wl,-udirectfb_$i -l$i" done echo_static=yes ;; --graphics=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /'`; do echo_graphics="$echo_graphics -Wl,-udirectfb_$i -l$i" done echo_static=yes ;; --font=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /'`; do echo_font="$echo_font -Wl,-uIDirectFBFont_$i -lidirectfbfont_$i" case $i in ft2) echo_font="$echo_font -lfreetype" ;; esac done echo_static=yes ;; --imageprovider=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /'`; do echo_imageprovider="$echo_imageprovider -Wl,-uIDirectFBImageProvider_$i -lidirectfbimageprovider_$i" case $i in imlib2) echo_imageprovider="$echo_imageprovider -lImlib2 -lttf -lm -L/usr/X11R6/lib -lXext -lX11" ;; jpeg) echo_imageprovider="$echo_imageprovider -ljpeg" ;; png) echo_imageprovider="$echo_imageprovider -lpng -lz -lm" ;; mpeg2) echo_imageprovider="$echo_imageprovider -lm" ;; esac done echo_static=yes ;; --videoprovider=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /'`; do echo_videoprovider="$echo_videoprovider -Wl,-uIDirectFBVideoProvider_$i -lidirectfbvideoprovider_$i" case $i in libmpeg3) echo_videoprovider="$echo_videoprovider -lmpeg3" ;; swf) echo_videoprovider="$echo_videoprovider -ljpeg -lz" ;; openquicktime) echo_videoprovider="$echo_videoprovider -lopenquicktime -lz -lglib -lm" ;; esac done echo_static=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_cflags" = "yes"; then if test ${prefix}/include/directfb != /usr/include ; then cflags="-I${prefix}/include/directfb" fi echo $cflags -D_REENTRANT -pthread fi if test "$echo_libs" = "yes"; then libs=-L${exec_prefix}/lib if test "$lib_directfb" = "yes"; then libs="$libs -ldirectfb -lpthread " fi if test "$lib_avifile" = "yes"; then libs="$libs @AVIFILE_LIBS@" fi echo $libs fi if test -n "$echo_static"; then echo -static -Wl,-udirectfb_fbdev fi if test -n "$echo_input"; then echo -L$moduledir/inputdrivers $echo_input fi if test -n "$echo_graphics"; then echo -L$moduledir/gfxdrivers $echo_graphics fi if test -n "$echo_font"; then echo -L$moduledir/interfaces/IDirectFBFont $echo_font fi if test -n "$echo_imageprovider"; then echo -L$moduledir/interfaces/IDirectFBImageProvider $echo_imageprovider fi if test -n "$echo_videoprovider"; then echo -L$moduledir/interfaces/IDirectFBVideoProvider $echo_videoprovider fi