From: <gra...@cu...> - 2007-01-15 16:51:07
|
min...@li... wrote: > Quoting Curt Schroeder <gra...@cu...>: >> If you install the dependent libs into the /mingw tree, as recommended >> in the MSYS docs, the required configure command for pkg-config is: >> ./configure --prefix=/mingw LDFLAGS=-L${prefix}/bin >> >> > > We have been recently suggesting that you set the --prefix like so: > ./configure --prefix=`cd /mingw && pwd -W` LDFLAGS=-L${prefix}/bin > > >> The following statements from the generated makefile cause a problem in >> the MSYS/MinGW compilation environment: >> pc_path = ${exec_prefix}/lib/pkgconfig:${prefix}/share/pkgconfig >> INCLUDES = -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" >> $(included_glib_includes) >> >> which is utilized in 'main.c' as follows: >> add_search_dirs(PKG_CONFIG_PC_PATH, G_SEARCHPATH_SEPARATOR_S); >> >> > > To avoid the obvious issue of a native program not recognizing the path. > > Earnie Boyd > Yes, that works much better, thank you. There is still a problem with the generated Makefile, but it is not an MSYS problem. The pkg-config code in 'main.c' correctly uses the platform dependent search path separator from the installed 'glib-2.0/glib/gutils.h', but the Makefile assumes the Un*x format when defining variable $(pc_path). Of course, this needs to be addressed in the pkg-config distribution, but the work-around for MSYS is to change the path separator in "pc_path = ${exec_prefix}/lib/pkgconfig:${prefix}/share/pkgconfig" to ';' prior to doing the make. The patch to parse.c for MSYS (http://sourceforge.net/mailarchive/message.php?msg_id=17998466) is still required by pkg-config-0.21. Curt |