X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=m17n-config.in;h=f69517cf72c73655a92f916d0f66a93d1534b231;hb=c0a729fe20b1eda2b9537d785318994bb16b53c4;hp=a1fc0e0cc7f33a5a181e08d8e85e98e42b681bc6;hpb=b5b8aa7815757a933f7fc8174781e1df34303de6;p=m17n%2Fm17n-lib.git diff --git a/m17n-config.in b/m17n-config.in index a1fc0e0..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"; LIBTOOLNAME="m17n-core"; shift;; -GUI|X) LIBNAME="-lm17n-core -lm17n -lm17n-gui"; LIBTOOLNAME="m17n-gui"; shift;; -*) LIBNAME="-lm17n-core -lm17n"; LIBTOOLNAME="m17n"; ;; +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${LIBTOOLNAME}.la" - ;; - + for name in $LIBTOOLNAME; do + echo -n "@libdir@/lib${name}.la " + done; + echo;; *) help exit 1;; @@ -57,7 +98,7 @@ cat > /dev/null <