On 08/23/2010 11:56 AM, Sergio Belkin wrote:
Hi,
I've autoconfiscated an open source project. I don't using still
automake, only I am using autoconf. So I've created an confugure.ac as
follows:
AC_PREREQ([2.65])
AC_INIT([UpTools],[8.4],[bugs-uptools@xxxxxxxxxx])
AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2])
Umm - this line says you're using automake.
AC_CONFIG_SRCDIR([UpConf.cc])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_CC
AC_LANG([C++])
AC_PROG_RANLIB
AC_CHECK_LIB([ssl], [main],[SSL=-lssl],echo "Error: Required library
ssl not found. Install openssl development package and try again"&&
exit 1 )
Get in the habit of using proper m4 quoting. Also, use AC_MSG_ERROR
instead of hand-rolling your own version (since your version forgot to
document anything in config.log):
AC_CHECK_LIB([ssl], [main],[SSL=-lssl],
[AC_MSG_ERROR(["Error: Required library ssl not found. Install
openssl development package and try again"])])
Another thing - these days, it is generally better to use AC_SEARCH_LIBS
than AC_CHECK_LIB, since there are some platforms that provide functions
in libc and thus don't require any external libraries to be linked in.
if test -e /usr/lib64/libresolv.a
Ouch - that is doomed to failure. It is better to check whether linking
with -lresolv can succeed, than it is to assume that existence of a
hard-coded location implies that the library is available.
I've build that on Mandriva 2010.1 and it worked fine. It compiles
with no problems. But it's failing to find mysql libraries on a Fedora
9 system even those libraries are installed:
I didn't see any mention of mysql in your sample configure.ac, nor any
macro call that would explain why you are getting this message:
checking for mysql_get_parameters in -lmysqlclient... no
Error: Required library mysqlclient not found. Install it and try again
Are you sure you pasted the right file?
--
Eric Blake eblake@xxxxxxxxxx +1-801-349-2682
Libvirt virtualization library http://libvirt.org
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf