1998-03-12 23:23:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
1998-06-11 00:52:24 +00:00
|
|
|
glib_libs="@glib_libs@"
|
|
|
|
glib_cflags="@glib_cflags@"
|
1998-06-10 23:44:55 +00:00
|
|
|
|
1998-03-12 23:23:43 +00:00
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
1998-04-04 00:12:58 +00:00
|
|
|
exec_prefix_set=no
|
1998-03-12 23:23:43 +00:00
|
|
|
|
|
|
|
usage="\
|
1998-04-04 00:12:58 +00:00
|
|
|
Usage: gtk-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
|
1998-03-12 23:23:43 +00:00
|
|
|
|
1998-04-04 00:12:58 +00:00
|
|
|
if test $# -eq 0; then
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
exit 1
|
1998-03-12 23:23:43 +00:00
|
|
|
fi
|
|
|
|
|
1998-04-04 00:12:58 +00: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)
|
|
|
|
echo $prefix
|
|
|
|
;;
|
|
|
|
--exec-prefix=*)
|
|
|
|
exec_prefix=$optarg
|
|
|
|
exec_prefix_set=yes
|
|
|
|
;;
|
|
|
|
--exec-prefix)
|
|
|
|
echo $exec_prefix
|
|
|
|
;;
|
|
|
|
--version)
|
|
|
|
echo @GTK_VERSION@
|
|
|
|
;;
|
|
|
|
--cflags)
|
1998-04-06 04:31:15 +00:00
|
|
|
if test @includedir@ != /usr/include ; then
|
|
|
|
includes=-I@includedir@
|
1998-06-10 23:44:55 +00:00
|
|
|
for i in $glib_cflags ; do
|
|
|
|
if test $i = -I@includedir@ ; then
|
|
|
|
includes=""
|
|
|
|
fi
|
|
|
|
done
|
1998-04-06 04:31:15 +00:00
|
|
|
fi
|
1998-07-16 21:24:52 +00:00
|
|
|
echo $includes @x_cflags@ $glib_cflags
|
1998-04-04 00:12:58 +00:00
|
|
|
;;
|
|
|
|
--libs)
|
1998-07-16 21:24:52 +00:00
|
|
|
my_glib_libs=
|
1998-06-10 23:44:55 +00:00
|
|
|
libdirs=-L@libdir@
|
|
|
|
for i in $glib_libs ; do
|
1998-07-16 21:24:52 +00:00
|
|
|
if test $i != -L@libdir@ ; then
|
1998-07-16 23:05:22 +00:00
|
|
|
if test -z "$my_glib_libs" ; then
|
1998-07-16 21:24:52 +00:00
|
|
|
my_glib_libs="$i"
|
|
|
|
else
|
|
|
|
my_glib_libs="$my_glib_libs $i"
|
|
|
|
fi
|
1998-06-10 23:44:55 +00:00
|
|
|
fi
|
|
|
|
done
|
1998-07-16 21:24:52 +00:00
|
|
|
echo $libdirs @x_ldflags@ -lgtk-@LT_RELEASE@ -lgdk-@LT_RELEASE@ $my_glib_libs @x_libs@ -lm
|
1998-04-04 00:12:58 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|