Blame m17n-config.in

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