diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-02-01 23:17:39 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-02-01 23:17:39 +0000 |
commit | 49ff13e5e1d15a8bc9dd5e9f1ab852efb8a3c86e (patch) | |
tree | 08f5eda3d753cc9e33a3765ab1dd687d50ece124 /gtk-config.in | |
parent | b3184736de326209fea25126473ed108b886b9f8 (diff) | |
download | gdk-pixbuf-49ff13e5e1d15a8bc9dd5e9f1ab852efb8a3c86e.tar.gz |
Pass gthread on to gtk-config.
Mon Feb 1 16:47:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk.m4: Pass gthread on to gtk-config.
* configure.in gtk-config.in: Support gthread flag to
add thread cflags/libraries into the output of
gtk-config.
Diffstat (limited to 'gtk-config.in')
-rw-r--r-- | gtk-config.in | 76 |
1 files changed, 60 insertions, 16 deletions
diff --git a/gtk-config.in b/gtk-config.in index f20dd7154..f056c3a42 100644 --- a/gtk-config.in +++ b/gtk-config.in @@ -2,19 +2,36 @@ glib_libs="@glib_libs@" glib_cflags="@glib_cflags@" +glib_thread_libs="@glib_thread_libs@" +glib_thread_cflags="@glib_thread_cflags@" prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no -usage="\ -Usage: gtk-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" +usage() +{ + cat <<EOF +Usage: gtk-config [OPTIONS] [LIBRARIES] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--version] + [--libs] + [--cflags] +Libraries: + gtk + gthread +EOF + exit $1 +} if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 + usage 1 1>&2 fi +lib_gtk=yes + while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; @@ -29,19 +46,51 @@ while test $# -gt 0; do fi ;; --prefix) - echo $prefix + echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) - echo $exec_prefix + echo_exec_prefix=yes ;; --version) echo @GTK_VERSION@ ;; --cflags) + 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 if test @includedir@ != /usr/include ; then includes=-I@includedir@ for i in $glib_cflags ; do @@ -51,8 +100,9 @@ while test $# -gt 0; do done fi echo $includes @x_cflags@ $glib_cflags - ;; - --libs) +fi + +if test "$echo_libs" = "yes"; then my_glib_libs= libdirs=-L@libdir@ for i in $glib_libs ; do @@ -64,13 +114,7 @@ while test $# -gt 0; do fi fi done + echo $libdirs @x_ldflags@ -lgtk -lgdk $my_glib_libs @INTLLIBS@ @x_libs@ @GDK_WLIBS@ -lm - ;; - *) - echo "${usage}" 1>&2 - exit 1 - ;; - esac - shift -done +fi |