Blame m17n-config.in

Packit 741ade
#!/bin/sh
Packit 741ade
# m17n-config -- helper script for the m17n library.	-*- coding: utf-8; -*-
Packit 741ade
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Packit 741ade
#   National Institute of Advanced Industrial Science and Technology (AIST)
Packit 741ade
#   Registration Number H15PRO112
Packit 741ade
# See the end for copying conditions.
Packit 741ade
Packit 741ade
prefix=@prefix@
Packit 741ade
exec_prefix=@exec_prefix@
Packit 741ade
Packit 741ade
help ()
Packit 741ade
{
Packit 741ade
  echo "Usage: $0 [API-LEVEL ...] [--version | --cflags | --libs | --libtool]"
Packit 741ade
  echo "  API-LEVEL is CORE, SHELL (default), GUI, or FLT"
Packit 741ade
}
Packit 741ade
Packit 741ade
if test $# -eq 0; then
Packit 741ade
  help 1>&2
Packit 741ade
  exit 0
Packit 741ade
fi
Packit 741ade
Packit 741ade
while true; do
Packit 741ade
case $1 in
Packit 741ade
CORE) if test "x$API" = "x"; then 
Packit 741ade
        API="CORE"; LIBTOOLNAME="m17n-core";
Packit 741ade
      fi;
Packit 741ade
      shift;;
Packit 741ade
Packit 741ade
SHELL) if test "x$API" != "xGUI"; then
Packit 741ade
         API="FLT"; LIBSHELL=" -lm17n"
Packit 741ade
         if test "x$LIBFLT" = "x"; then
Packit 741ade
           LIBTOOLNAME="m17n";
Packit 741ade
         else
Packit 741ade
           LIBTOOLNAME="m17n m17n-flt";
Packit 741ade
	 fi
Packit 741ade
       fi;
Packit 741ade
       shift;;
Packit 741ade
Packit 741ade
FLT) if test "x$API" != "xGUI"; then
Packit 741ade
       API="FLT"; LIBFLT=" -lm17n-flt"
Packit 741ade
       if test "x$LIBSHELL" = "x"; then
Packit 741ade
         LIBTOOLNAME="m17n-flt";
Packit 741ade
       else
Packit 741ade
         LIBTOOLNAME="m17n m17n-flt";
Packit 741ade
       fi
Packit 741ade
     fi;
Packit 741ade
     shift;;
Packit 741ade
Packit 741ade
GUI|X) API="GUI";
Packit 741ade
       LIBSHELL=" -lm17n"; LIBFLT=" -lm17n-flt"; LIBGUI=" -lm17n-gui";
Packit 741ade
       LIBTOOLNAME="m17n-gui";
Packit 741ade
       shift;;
Packit 741ade
Packit 741ade
*) break;;
Packit 741ade
esac
Packit 741ade
done
Packit 741ade
Packit 741ade
LIBNAME="-lm17n-core"
Packit 741ade
Packit 741ade
if test "x$API" = "x"; then
Packit 741ade
  LIBNAME="$LIBNAME -lm17n"
Packit 741ade
  LIBTOOLNAME="m17n"
Packit 741ade
else
Packit 741ade
  LIBNAME="$LIBNAME$LIBSHELL$LIBFLT$LIBGUI"
Packit 741ade
fi
Packit 741ade
Packit 125574
platform=`uname -m`
Packit 125574
Packit 741ade
case $1 in
Packit 741ade
--version)
Packit 741ade
  echo "@PACKAGE_VERSION@";;
Packit 741ade
Packit 741ade
--libs)
Packit 125574
  echo "${LIBNAME}";;
Packit 125574
  
Packit 741ade
--cflags)
Packit 741ade
  if test "@includedir@" != "/usr/include"; then
Packit 741ade
    echo "-I@includedir@"
Packit 741ade
  fi;;
Packit 741ade
Packit 741ade
--libtool)
Packit 741ade
  for name in $LIBTOOLNAME; do
Packit 125574
   case $platform in
Packit 125574
    x86_64|ppc64|s390x|sparc64)
Packit 125574
      echo -n "/usr/lib64/lib${name}.la "
Packit 125574
      ;;
Packit 125574
    *)
Packit 125574
      echo -n "/usr/lib/lib${name}.la "
Packit 125574
      ;;
Packit 125574
   esac
Packit 741ade
  done;
Packit 741ade
  echo;;
Packit 741ade
*)
Packit 741ade
    help
Packit 741ade
    exit 1;;
Packit 741ade
esac
Packit 741ade
exit 0
Packit 741ade
Packit 741ade
cat > /dev/null <
Packit 741ade
/*** -*- coding: euc-jp; -*- */
Packit 741ade
/***en @page m17n-config Print compile/link options of the m17n library */
Packit 741ade
/***ja @page m17n-config m17n ライブラリのコンパイル・リンクオプションの表示 */
Packit 741ade
Packit 741ade
/***
Packit 741ade
@section m17n-config-synopsis SYNOPSIS
Packit 741ade
Packit 741ade
m17n-config [API-LEVEL ...] [--cflags | --libs | --libtool] [--version]
Packit 741ade
Packit 741ade
@section m17n-config-description DESCRIPTION
Packit 741ade
Packit 741ade
The shell script m17n-config prints compile and link options for a
Packit 741ade
program that uses the m17n library.
Packit 741ade
Packit 741ade
By default, the printed options are for such a program that uses SHELL
Packit 741ade
API of the libray.  But, if the first argument is "CORE", "GUI", or
Packit 741ade
"FLT", the options are for a program that uses the corresponding API.
Packit 741ade
Packit 741ade
The other arguments are as follows.
Packit 741ade
Packit 741ade
- --cflags\n
Packit 741ade
	Print compile option (e.g. -I/usr/local/include)
Packit 741ade
- --libs\n
Packit 741ade
	Print link option (e.g. -L/usr/local/lib -lm17n)
Packit 741ade
- --libtool\n
Packit 741ade
	Print libtool option (e.g. /usr/local/lib/libm17n.la)
Packit 741ade
- --version\n
Packit 741ade
	Print version number of the m17n library.
Packit 741ade
*/ 
Packit 741ade
EOF
Packit 741ade
Packit 741ade
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Packit 741ade
#   National Institute of Advanced Industrial Science and Technology (AIST)
Packit 741ade
#   Registration Number H15PRO112
Packit 741ade
Packit 741ade
# This file is part of the m17n library.
Packit 741ade
Packit 741ade
# The m17n library is free software; you can redistribute it and/or
Packit 741ade
# modify it under the terms of the GNU Lesser General Public License
Packit 741ade
# as published by the Free Software Foundation; either version 2.1 of
Packit 741ade
# the License, or (at your option) any later version.
Packit 741ade
Packit 741ade
# The m17n library is distributed in the hope that it will be useful,
Packit 741ade
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 741ade
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 741ade
# Lesser General Public License for more details.
Packit 741ade
Packit 741ade
# You should have received a copy of the GNU Lesser General Public
Packit 741ade
# License along with the m17n library; if not, write to the Free
Packit 741ade
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit 741ade
# Boston, MA 02110-1301, USA.