X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=m17n-config.in;h=f69517cf72c73655a92f916d0f66a93d1534b231;hb=86901159bdefc3f4cf32a8b3894bfb8b78242821;hp=9117c5fd671fbb011d693112b0947eb1104d7c12;hpb=0462c7e0371a52eb7dd86a3b2906b82980373739;p=m17n%2Fm17n-lib.git diff --git a/m17n-config.in b/m17n-config.in index 9117c5f..f69517c 100644 --- a/m17n-config.in +++ b/m17n-config.in @@ -1,6 +1,6 @@ #!/bin/sh # m17n-config -- helper script for the m17n library. -*- coding: euc-jp; -*- -# Copyright (C) 2003, 2004 +# Copyright (C) 2003, 2004, 2006, 2007 # National Institute of Advanced Industrial Science and Technology (AIST) # Registration Number H15PRO112 # See the end for copying conditions. @@ -10,7 +10,8 @@ exec_prefix=@exec_prefix@ help () { - echo "Usage: $0 [CORE | GUI] [--version | --cflags | --libs | --libtool]" + echo "Usage: $0 [API-LEVEL ...] [--version | --cflags | --libs | --libtool]" + echo " API-LEVEL is CORE, SHELL (default), GUI, or FLT" } if test $# -eq 0; then @@ -18,11 +19,50 @@ if test $# -eq 0; then exit 0 fi +while true; do case $1 in -CORE) LIBNAME="-lm17n-core"; shift;; -GUI|X) LIBNAME="-lm17n-core -lm17n -lm17n-gui"; shift;; -*) LIBNAME="-lm17n-core -lm17n";; +CORE) if test "x$API" = "x"; then + API="CORE"; LIBTOOLNAME="m17n-core"; + fi; + shift;; + +SHELL) if test "x$API" != "xGUI"; then + API="FLT"; LIBSHELL=" -lm17n" + if test "x$LIBFLT" = "x"; then + LIBTOOLNAME="m17n"; + else + LIBTOOLNAME="m17n m17n-flt"; + fi + fi; + shift;; + +FLT) if test "x$API" != "xGUI"; then + API="FLT"; LIBFLT=" -lm17n-flt" + if test "x$LIBSHELL" = "x"; then + LIBTOOLNAME="m17n-flt"; + else + LIBTOOLNAME="m17n m17n-flt"; + fi + fi; + shift;; + +GUI|X) API="GUI"; + LIBSHELL=" -lm17n"; LIBFLT=" -lm17n-flt"; LIBGUI=" -lm17n-gui"; + LIBTOOLNAME="m17n-gui"; + shift;; + +*) break;; esac +done + +LIBNAME="-lm17n-core" + +if test "x$API" = "x"; then + LIBNAME="$LIBNAME -lm17n" + LIBTOOLNAME="m17n" +else + LIBNAME="$LIBNAME$LIBSHELL$LIBFLT$LIBGUI" +fi case $1 in --version) @@ -41,9 +81,10 @@ case $1 in fi;; --libtool) - echo "@libdir@/lib${LIBNAME}.la" - ;; - + for name in $LIBTOOLNAME; do + echo -n "@libdir@/lib${name}.la " + done; + echo;; *) help exit 1;; @@ -57,7 +98,7 @@ cat > /dev/null <