glib/glib-config-2.0.in

118 lines
1.9 KiB
Plaintext
Raw Normal View History

1998-06-11 01:21:14 +02:00
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
1998-08-09 10:32:18 +02:00
usage()
{
cat <<EOF
Usage: glib-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
Libraries:
glib
gmodule
gobject
gthread
1998-08-09 10:32:18 +02:00
EOF
exit $1
}
1998-06-11 01:21:14 +02:00
if test $# -eq 0; then
1998-08-09 10:32:18 +02:00
usage 1 1>&2
1998-06-11 01:21:14 +02:00
fi
1998-08-09 10:32:18 +02:00
lib_glib=yes
1998-06-11 01:21:14 +02:00
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
1998-08-09 10:32:18 +02:00
echo_prefix=yes
1998-06-11 01:21:14 +02:00
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
1998-08-09 10:32:18 +02:00
echo_exec_prefix=yes
1998-06-11 01:21:14 +02:00
;;
--version)
echo @GLIB_VERSION@
1998-08-09 10:32:18 +02:00
exit 0
1998-06-11 01:21:14 +02:00
;;
--cflags)
includes="-I@includedir@/glib-2.0"
1998-08-09 10:32:18 +02:00
echo_cflags=yes
1998-06-11 01:21:14 +02:00
;;
--libs)
1998-08-09 10:32:18 +02:00
echo_libs=yes
;;
glib)
lib_glib=yes
;;
gmodule)
lib_gmodule=yes
1998-06-11 01:21:14 +02:00
;;
gobject)
lib_gobject=yes
;;
gthread)
lib_gthread=yes
;;
1998-06-11 01:21:14 +02:00
*)
1998-08-09 10:32:18 +02:00
usage 1 1>&2
1998-06-11 01:21:14 +02:00
;;
esac
shift
done
1998-08-09 10:32:18 +02:00
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
cflags=""
if test "$lib_gthread" = "yes"; then
cflags="$cflags @G_THREAD_CFLAGS@"
fi
echo -I@libdir@/glib-2.0/include $includes $cflags
1998-08-09 10:32:18 +02:00
fi
if test "$echo_libs" = "yes"; then
libsp=""
libsa=""
1998-08-09 10:32:18 +02:00
if test "$lib_glib" = "yes"; then
libsp="$libsp -lglib-1.3"
libsa="$libsa @ICONV_LIBS@ @INTLLIBS@"
1998-08-09 10:32:18 +02:00
fi
if test "$lib_gobject" = "yes"; then
libsp="-lgobject-1.3 $libsp"
fi
if test "$lib_gthread" = "yes"; then
libsp="-lgthread-1.3 $libsp"
libsa="$libsa @G_THREAD_LIBS@"
fi
if test "$lib_gmodule" = "yes"; then
libsp="@G_MODULE_LDFLAGS@ -lgmodule-1.3 $libsp"
libsa="$libsa @G_MODULE_LIBS@"
fi
echo -L@libdir@ $libsp $libsa
1998-08-09 10:32:18 +02:00
fi