Find the answer to your Linux question:
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 ...
  1. #1
    Just 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

  2. #2
    Linux Guru Rubberman's Avatar
    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!

  3. #3
    Just 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".

  4. #4
    Just Joined!
    Join Date
    May 2011
    Posts
    0
    Quote Originally Posted by Rubberman View Post
    You can use the "whereis <libname>" command, such as "whereis libc".
    great man, tnx...

    Now, Do you know how can I compare it with prefix?

  5. #5
    Just Joined!
    Join Date
    May 2011
    Posts
    0
    can you post the error you are facing ..

  6. #6
    Just Joined!
    Join Date
    May 2011
    Posts
    0
    Quote Originally Posted by pradeepreddy3 View Post
    can you post the error you are facing ..
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •