Autoconf AM_PATH_WXCONFIG macro question Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Autoconf AM_PATH_WXCONFIG macro question

Post by Cursor » Thu May 13, 2010 2:56 pm

Hi all.

I intend to write a configure.ac file using wxwin.m4 macros instead of using `wx-config ...` directly.

As described in wxwin.m4, I wrote :

Code: Select all

AM_OPTIONS_WXCONFIG
reqwx=2.9.1
AM_PATH_WXCONFIG($reqwx, wxWin=1,,[ribbon,aui,stc,core,net])
if test "$wxWin" != 1; then
	AC_MSG_ERROR([
		wxWidgets must be installed on your system.
 
		Please check that wx-config is in path, the directory
		where wxWidgets libraries are installed (returned by
		'wx-config --libs' or 'wx-config --static --libs' command)
		is in LD_LIBRARY_PATH or equivalent variable and
		wxWidgets version is $reqwx or above.
		])
fi
echo "wxWidgets version : $WX_VERSION"
echo "wxWidgets libs    : $WX_LIBS"
In order to enable wx (2.9.1 from svn) with ribbon, stc and aui enabled.

But when I ran the generated configure, it provides :

Code: Select all

...
checking for wx-config... /usr/local/bin/wx-config
checking for wxWidgets version >= 2.9.1... yes (version 2.9.1)
checking for wxWidgets static library... no
wxWidgets version : 2.9.1
wxWidgets libs    : -L/usr/local/lib -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9
No linked lib to aui, stc nor ribbon ... strange.

Moreover, in the same terminal, when I query it by hand, it say to me :

Code: Select all

$ wx-config --libs ribbon,aui,stc,core,net
-L/usr/local/lib -pthread   -lwx_gtk2u_ribbon-2.9 -lwx_gtk2u_aui-2.9 -lwx_gtk2u_stc-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9
What should I do to enable correct libs ? (enable all libs is also good for me ;))

Thanks.
Emilien
What is little and green, witch go up and down ??
Yoda playing with the force.

DavidHart
Site Admin
Site Admin
Posts: 4008
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Thu May 13, 2010 7:03 pm

Hi,

I see that you use AM_PATH_WXCONFIG, which is deprecated in the 2.9.1 wxwin.m4.

Are you using the 2.9.1 version? If not, do so, as (afaict) the new macro, WX_CONFIG_CHECK, does look specifically for the requested libs.

Regards,

David

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Thu May 13, 2010 7:35 pm

Yes I do. I use an up-to-date svn trunk working copy so 2.9.1.

I will invastigate with using WX_CONFIG_CHECK.

Thanks.
What is little and green, witch go up and down ??
Yoda playing with the force.

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Thu May 13, 2010 7:57 pm

Thanks very much David.
Work well now.
What is little and green, witch go up and down ??
Yoda playing with the force.

Post Reply