[maemo-developers] [maemo-developers] about configure.ac
From: Murray Cumming murrayc at murrayc.comDate: Fri Jun 2 09:58:46 EEST 2006
- Previous message: [maemo-developers] about configure.ac - 2
- Next message: [maemo-developers] Regarding libcst sources download
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I had written something about that. > > This document is describing how to include additional library in an > automake/autoconf project. > 1) Check if the library is pkg-config enabled, usually the library > would have the .pc file in the /usr/lib/pkgconfig directory. > 2) From the .pc file, edit and check the version of the library. > 3) At the configure.ac add the following: > > PKG_CHECK_MODULES(<MACRO_LIBRARY_NAME>, <library_name> >= <VERSION> > AC_SUBST(<MACRO_LIBRARY_NAME>_LIBS) > AC_SUBST(<MACRO_LIBRARY_NAME>_CFLAGS) > > 4) At the Makefile.am at the src directory, add the following: > > Append $(<MACRO_LIBRARY_NAME>_CFLAGS) in the INCLUDES line. > Append $(<MACRO_LIBRARY_NAME>_LIBS) in the LDADD line. It if isn't clear, MACRO_LIBRARY_NAME here is any text that you choose. It can be anything that you like. In my explanation of this, I suggest that people just call it DEPS. http://www.openismus.com/documents/linux/using_libraries/using_libraries.shtml#cflagsandlibs Murray Cumming murrayc at murrayc.com www.murrayc.com www.openismus.com
- Previous message: [maemo-developers] about configure.ac - 2
- Next message: [maemo-developers] Regarding libcst sources download
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]