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@"
|
1999-02-01 23:17:39 +00:00
|
|
|
glib_thread_libs="@glib_thread_libs@"
|
|
|
|
glib_thread_cflags="@glib_thread_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
|
|
|
|
1999-02-01 23:17:39 +00:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
cat <<EOF
|
|
|
|
Usage: gtk-config [OPTIONS] [LIBRARIES]
|
|
|
|
Options:
|
|
|
|
[--prefix[=DIR]]
|
|
|
|
[--exec-prefix[=DIR]]
|
|
|
|
[--version]
|
|
|
|
[--libs]
|
|
|
|
[--cflags]
|
|
|
|
Libraries:
|
|
|
|
gtk
|
|
|
|
gthread
|
|
|
|
EOF
|
|
|
|
exit $1
|
|
|
|
}
|
1998-03-12 23:23:43 +00:00
|
|
|
|
1998-04-04 00:12:58 +00:00
|
|
|
if test $# -eq 0; then
|
1999-02-01 23:17:39 +00:00
|
|
|
usage 1 1>&2
|
1998-03-12 23:23:43 +00:00
|
|
|
fi
|
|
|
|
|
1999-02-01 23:17:39 +00:00
|
|
|
lib_gtk=yes
|
|
|
|
|
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)
|
1999-02-01 23:17:39 +00:00
|
|
|
echo_prefix=yes
|
1998-04-04 00:12:58 +00:00
|
|
|
;;
|
|
|
|
--exec-prefix=*)
|
|
|
|
exec_prefix=$optarg
|
|
|
|
exec_prefix_set=yes
|
|
|
|
;;
|
|
|
|
--exec-prefix)
|
1999-02-01 23:17:39 +00:00
|
|
|
echo_exec_prefix=yes
|
1998-04-04 00:12:58 +00:00
|
|
|
;;
|
|
|
|
--version)
|
|
|
|
echo @GTK_VERSION@
|
|
|
|
;;
|
|
|
|
--cflags)
|
1999-02-01 23:17:39 +00:00
|
|
|
echo_cflags=yes
|
|
|
|
;;
|
|
|
|
--libs)
|
|
|
|
echo_libs=yes
|
|
|
|
;;
|
|
|
|
gtk)
|
|
|
|
lib_gtk=yes
|
|
|
|
;;
|
|
|
|
gthread)
|
|
|
|
lib_gthread=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage 1 1>&2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
if test "$echo_prefix" = "yes"; then
|
|
|
|
echo $prefix
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$echo_exec_prefix" = "yes"; then
|
|
|
|
echo $exec_prefix
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$lib_gthread" = "yes"; then
|
|
|
|
glib_cflags="$glib_thread_cflags"
|
|
|
|
glib_libs="$glib_thread_libs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$echo_cflags" = "yes"; then
|
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
|
1999-03-13 16:40:24 +00:00
|
|
|
echo -I@libdir@/gtk+/include $includes @x_cflags@ $glib_cflags
|
1999-02-01 23:17:39 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$echo_libs" = "yes"; then
|
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
|
1999-02-01 23:17:39 +00:00
|
|
|
|
1998-12-18 01:32:33 +00:00
|
|
|
echo $libdirs @x_ldflags@ -lgtk -lgdk $my_glib_libs @INTLLIBS@ @x_libs@ @GDK_WLIBS@ -lm
|
1999-02-01 23:17:39 +00:00
|
|
|
fi
|
1998-04-04 00:12:58 +00:00
|
|
|
|