[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need help trying to figure out how to write gtk hello world configur
From: |
Giles |
Subject: |
Re: need help trying to figure out how to write gtk hello world configure.in |
Date: |
Mon, 2 Jan 2006 16:17:19 +0000 |
User-agent: |
KMail/1.9.1 |
On Monday 02 January 2006 01:58, Matt Hull wrote:
> i am trying to write a hello world app that can use nothing, gtk 1.2, or
> 2.0.
>
> sofar, nothing with autoconf works
Have a look at 'man pkg-config'.
In particular the section 'AUTOCONF MACROS'.
It's very helpful.
Giles
>
> i tried this:
>
> # check if gtk should be used
> AC_ARG_WITH(gtk, [ --with-gtk use GTK GUI toolkit ])
> if test "$with_gtk" = "yes" -o "$enable_gtk" = "yes" ; then
> if test "$withval" = "no" ; then
> with_gtk="no"
> else
> with_gtk="yes"
> fi
> fi
>
> if test "$with_gtk" = "yes"; then
> HAVE_GTK=yes
> AC_SUBST(HAVE_GTK)
> fi
>
> that works but i do not see HAVE_GTK in config.h
>
>
> then i tried:
>
> #AC_MSG_CHECKING(checking if gtk should be used)
>
> AC_ARG_WITH(gtk,
> [ --with-gtk enable gtk support],
> with_gtk=$withval,
> with_gtk=yes)
> AC_MSG_RESULT($with_foo)
>
> if test "$with_gtk" = "yes"; then
> AC_DEFINE(HAVE_GTK)
> fi
>
> and that fails with:
>
> /usr/bin/autoheader: Symbol `HAVE_GTK' is not covered by
> /usr/share/autoconf/acconfig.h
>
> but still writes the configure script, and when i run make it wants to run
> autoconf and automake again, no idea why.
>
> can anyone help ???
>
> then if i get that working i need to determine the gtk version so i use
> the right code as gtk 1.2 and gtk 2.0 are different.
>
> if i choose not to use gtk at all from the configure script, how can i
> have the make files skip it.
>
> right now if it is not selected the make file still try to compile both
> versions and fail because one or both versions are not there.
>
> thanks
>
> matt
>
>
> _______________________________________________
> Autoconf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf