forked from AuroraMiddleware/gtk
Added flags --prefix[=dir] and --exec-prefix[=DIR] which allow querying
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu> * gtk-config.in: Added flags --prefix[=dir] and --exec-prefix[=DIR] which allow querying and overriding the configured-in prefix and exec-prefix. * gtk.m4: Added configure flags --with-gtk-prefix= and --with-gtk-exec-prefix= to set the --prefix and --exec-prefix argumetns to gtk.m4
This commit is contained in:
parent
308adaa6db
commit
b1446447fc
13
ChangeLog
13
ChangeLog
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
Fri Apr 3 18:33:47 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* glib/testglib.c: Removed literal german from strings
|
* gtk-config.in: Added flags --prefix[=dir] and
|
||||||
to appease SGI compiler.
|
--exec-prefix[=DIR] which allow querying and overriding the
|
||||||
|
configured-in prefix and exec-prefix.
|
||||||
|
|
||||||
|
* gtk.m4: Added configure flags --with-gtk-prefix=
|
||||||
|
and --with-gtk-exec-prefix= to set the --prefix and
|
||||||
|
--exec-prefix argumetns to gtk.m4
|
||||||
|
|
||||||
|
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gdk/gdk.c: More extensive debugging output
|
* gdk/gdk.c: More extensive debugging output
|
||||||
|
|
||||||
|
@ -16,17 +16,27 @@ $exec_prefix/bin):
|
|||||||
Invoking gtk-config
|
Invoking gtk-config
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
gtk-config can be invoked in one of three forms:
|
gtk-config takes the following flags:
|
||||||
|
|
||||||
gtk-config --version
|
--version
|
||||||
Prints out the version of GTK installed
|
Prints out the version of GTK installed
|
||||||
|
|
||||||
gtk-config --cflags
|
--cflags
|
||||||
Prints '-I' flags pointing to the installed header files.
|
Prints '-I' flags pointing to the installed header files.
|
||||||
|
|
||||||
gtk-config --libs
|
--libs
|
||||||
Prints out the linker flags necessary to link a program against GTK
|
Prints out the linker flags necessary to link a program against GTK
|
||||||
|
|
||||||
|
--prefix[=PREFIX]
|
||||||
|
If PREFIX is specified, overrides the configured value of $prefix.
|
||||||
|
(And of exec-prefix, unless --exec-prefix is also specified)
|
||||||
|
Otherwise, prints out the configured value of $prefix
|
||||||
|
|
||||||
|
--exec-prefix[=PREFIX]
|
||||||
|
If PREFIX is specified, overrides the configured value of $exec_prefix.
|
||||||
|
Otherwise, prints out the configured value of $exec_prefix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Example of using gtk-config
|
Example of using gtk-config
|
||||||
---------------------------
|
---------------------------
|
||||||
@ -88,6 +98,24 @@ the configure script.
|
|||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
|
* The directory where the GTK libraries are installed needs
|
||||||
|
to be found by your system's dynamic linker.
|
||||||
|
|
||||||
|
This is generally done by
|
||||||
|
|
||||||
|
editing /etc/ld.so.conf and running ldconfig
|
||||||
|
|
||||||
|
Or by:
|
||||||
|
|
||||||
|
setting the environment variable LD_LIBRARY_PATH,
|
||||||
|
|
||||||
|
or, as a last resort,
|
||||||
|
|
||||||
|
Giving a -R or -rpath flag (depending on your linker) when
|
||||||
|
running configure, for instance:
|
||||||
|
|
||||||
|
LDFLAGS=-R/usr/home/owen/lib ./configure
|
||||||
|
|
||||||
* You can also specify a gtk-config not in your path by
|
* You can also specify a gtk-config not in your path by
|
||||||
setting the GTK_CONFIG environment variable to the
|
setting the GTK_CONFIG environment variable to the
|
||||||
name of the executable
|
name of the executable
|
||||||
@ -96,9 +124,16 @@ Notes:
|
|||||||
you will need either need to modify gtk-config script
|
you will need either need to modify gtk-config script
|
||||||
manually to point to the new location or rebuild GTK.
|
manually to point to the new location or rebuild GTK.
|
||||||
|
|
||||||
[ As a future enhancement AM_PATH_GTK should support options
|
Advanced note:
|
||||||
to override the default locations found in gtk-config ]
|
|
||||||
|
|
||||||
|
* configure flags
|
||||||
|
|
||||||
|
--with-gtk-prefix=PREFIX
|
||||||
|
--with-gtk-exec-prefix=PREFIX
|
||||||
|
|
||||||
|
are provided to override the prefix and exec-prefix that were stored
|
||||||
|
in the gtk-config shell script by GTK's configure. You are generally
|
||||||
|
better off configuring GTK with the right path to begin with.
|
||||||
|
|
||||||
Example of a package using AM_PATH_GTK
|
Example of a package using AM_PATH_GTK
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -2,28 +2,55 @@
|
|||||||
|
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
exec_prefix_set=no
|
||||||
|
|
||||||
usage="\
|
usage="\
|
||||||
Usage: gtk-config [--version] [--libs] [--cflags]"
|
Usage: gtk-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
|
||||||
|
|
||||||
if test $# -ne 1 ; then
|
if test $# -eq 0; then
|
||||||
echo "${usage}" 1>&2
|
echo "${usage}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $1 in
|
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)
|
--version)
|
||||||
echo @GTK_VERSION@
|
echo @GTK_VERSION@
|
||||||
;;
|
;;
|
||||||
--cflags)
|
--cflags)
|
||||||
|
libdir=@libdir@
|
||||||
echo -I$libdir/glib/include -I@includedir@ @x_cflags@
|
echo -I$libdir/glib/include -I@includedir@ @x_cflags@
|
||||||
;;
|
;;
|
||||||
--libs)
|
--libs)
|
||||||
|
libdir=@libdir@
|
||||||
echo -L@libdir@ @x_ldflags@ -lgtk -lgdk -lglib @x_libs@ -lm
|
echo -L@libdir@ @x_ldflags@ -lgtk -lgdk -lglib @x_libs@ -lm
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "${usage}" 1>&2
|
echo "${usage}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
22
gtk.m4
22
gtk.m4
@ -8,13 +8,31 @@ AC_DEFUN(AM_PATH_GTK,
|
|||||||
[dnl
|
[dnl
|
||||||
dnl Get the cflags and libraries from the gtk-config script
|
dnl Get the cflags and libraries from the gtk-config script
|
||||||
dnl
|
dnl
|
||||||
|
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||||
|
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||||
|
|
||||||
|
if test x$gtk_config_exec_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$gtk_config_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||||
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||||
no_gtk=""
|
no_gtk=""
|
||||||
if test "$GTK_CONFIG" != "no" ; then
|
if test "$GTK_CONFIG" != "no" ; then
|
||||||
GTK_CFLAGS=`$GTK_CONFIG --cflags`
|
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||||
GTK_LIBS=`$GTK_CONFIG --libs`
|
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||||
ac_save_CFLAGS="$CFLAGS"
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
Loading…
Reference in New Issue
Block a user