Results 1 to 6 of 6
I am trying to create a configure file for some library with the name for example "XYZ", so first of all I need to check this library is installed before ...
- 05-21-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 0
Verifying a programme is already installed or not in linux with config
I am trying to create a configure file for some library with the name for example "XYZ", so first of all I need to check this library is installed before or not?
for example for checking the library math we can use the following in the configure.ac file;
AC_CHECK_LIBM
AC_SUBST(LIBM)
but while trying autoconf with AC_CHECK_LIBXYZ or AC_CHECK_XYZ I get this error:
configure.ac:30: error: possibly undefined macro: AC_CHECK_LIBXYZ
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
I used AC_HAVE_LIBRARY([XYZ]) too, but while executing ./confgiure I got this:
checking for main in -lXYZ... no
I should add that the XYZ library is installed in /usr/local/XYZ
any idea will be appreciated,
Thanks
- 05-23-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,956
You can use the "whereis <libname>" command, such as "whereis libc".
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-23-2011 #3Just Joined!
- Join Date
- May 2011
- Posts
- 0
Hi,
You can first find config file by
find / -iname *config
This will list out files with suffix "config" . If you could not find the file XYZ.config in output then install package library package for "XYZ".
- 05-23-2011 #4Just Joined!
- Join Date
- May 2011
- Posts
- 0
- 05-23-2011 #5Just Joined!
- Join Date
- May 2011
- Posts
- 0
can you post the error you are facing ..
- 05-23-2011 #6Just Joined!
- Join Date
- May 2011
- Posts
- 0
Actually I am trying now to determine that my library is installed before or not?
with whereis <libname> I can find the path where my library is installed( /usr/local/XYZ)
Now, I wanna check if this path is equal to prefix or not? if it is not equal ask user "Are you sure..." (st like this)
I am not sure that this may be a good way.
Thanks m8 for your response.


Reply With Quote

