Renamed from m17n-config.in.
authorhanda <handa>
Wed, 31 Mar 2010 04:13:13 +0000 (04:13 +0000)
committerhanda <handa>
Wed, 31 Mar 2010 04:13:13 +0000 (04:13 +0000)
m17n-config-2.0.in [new file with mode: 0644]

diff --git a/m17n-config-2.0.in b/m17n-config-2.0.in
new file mode 100644 (file)
index 0000000..b7f4972
--- /dev/null
@@ -0,0 +1,144 @@
+#!/bin/sh
+# m17n-config -- helper script for the m17n library.   -*- coding: euc-jp; -*-
+# Copyright (C) 2003, 2004, 2006, 2007
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H15PRO112
+# See the end for copying conditions.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+help ()
+{
+  echo "Usage: $0 [API-LEVEL ...] [--version | --cflags | --libs | --libtool]"
+  echo "  API-LEVEL is CORE, SHELL (default), GUI, or FLT"
+}
+
+if test $# -eq 0; then
+  help 1>&2
+  exit 0
+fi
+
+while true; do
+case $1 in
+CORE) if test "x$API" = "x"; then 
+        API="CORE"; LIBTOOLNAME="m17n-core-@M17N_BINARY_VERSION@";
+      fi;
+      shift;;
+
+SHELL) if test "x$API" != "xGUI"; then
+         API="FLT"; LIBSHELL=" -lm17n-@M17N_BINARY_VERSION@"
+         if test "x$LIBFLT" = "x"; then
+           LIBTOOLNAME="m17n-@M17N_BINARY_VERSION@";
+         else
+           LIBTOOLNAME="m17n-@M17N_BINARY_VERSION@ m17n-flt-@M17N_BINARY_VERSION@";
+        fi
+       fi;
+       shift;;
+
+FLT) if test "x$API" != "xGUI"; then
+       API="FLT"; LIBFLT=" -lm17n-flt-@M17N_BINARY_VERSION@"
+       if test "x$LIBSHELL" = "x"; then
+         LIBTOOLNAME="m17n-flt-@M17N_BINARY_VERSION@";
+       else
+         LIBTOOLNAME="m17n m17n-flt-@M17N_BINARY_VERSION@";
+       fi
+     fi;
+     shift;;
+
+GUI|X) API="GUI";
+       LIBSHELL=" -lm17n-@M17N_BINARY_VERSION@"; LIBFLT=" -lm17n-flt-@M17N_BINARY_VERSION@"; LIBGUI=" -lm17n-gui-@M17N_BINARY_VERSION@";
+       LIBTOOLNAME="m17n-gui-@M17N_BINARY_VERSION@";
+       shift;;
+
+*) break;;
+esac
+done
+
+LIBNAME="-lm17n-core-@M17N_BINARY_VERSION@"
+
+if test "x$API" = "x"; then
+  LIBNAME="$LIBNAME -lm17n-@M17N_BINARY_VERSION@"
+  LIBTOOLNAME="m17n-@M17N_BINARY_VERSION@"
+else
+  LIBNAME="$LIBNAME$LIBSHELL$LIBFLT$LIBGUI"
+fi
+
+case $1 in
+--version)
+  echo "@PACKAGE_VERSION@";;
+
+--libs)
+  if test "@libdir@" != "/usr/lib"; then
+    echo "-L@libdir@ ${LIBNAME}"
+  else
+    echo "${LIBNAME}"
+  fi;;
+
+--cflags)
+  if test "@includedir@" != "/usr/include"; then
+    echo "-I@includedir@"
+  fi;;
+
+--libtool)
+  for name in $LIBTOOLNAME; do
+    echo -n "@libdir@/lib${name}.la "
+  done;
+  echo;;
+*)
+    help
+    exit 1;;
+esac
+exit 0
+
+cat > /dev/null <<EOF
+/***en @page m17n-config Print compile/link options of the m17n library */
+/***ja @page m17n-config m17n ¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¡¦¥ê¥ó¥¯¥ª¥×¥·¥ç¥ó¤Îɽ¼¨ */
+
+/***
+@section m17n-config-synopsis SYNOPSIS
+
+m17n-config [API-LEVEL ...] [--cflags | --libs | --libtool] [--version]
+
+@section m17n-config-description DESCRIPTION
+
+The shell script m17n-config prints compile and link options for a
+program that uses the m17n library.
+
+By default, the printed options are for such a program that uses SHELL
+API of the libray.  But, if the first argument is "CORE", "GUI", or
+"FLT", the options are for a program that uses the corresponding API.
+
+The other arguments are as follows.
+
+- --cflags\n
+       Print compile option (e.g. -I/usr/local/include)
+- --libs\n
+       Print link option (e.g. -L/usr/local/lib -lm17n)
+- --libtool\n
+       Print libtool option (e.g. /usr/local/lib/libm17n.la)
+- --version\n
+       Print version number of the m17n library.
+*/ 
+EOF
+
+# Copyright (C) 2003, 2004
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H15PRO112
+
+# This file is part of the m17n library.
+
+# The m17n library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+
+# The m17n library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the m17n library; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.