[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_LIB: Library is found on build host but is not on a target host
From: |
Sergio Belkin |
Subject: |
AC_CHECK_LIB: Library is found on build host but is not on a target host |
Date: |
Mon, 23 Aug 2010 14:56:43 -0300 |
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],address@hidden)
AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2])
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 )
AC_CHECK_LIB([crypto], [main],[CRYPTO=-lcrypto],echo "Error: Required
library crypto not found. Install openssl development package and try
again" && exit 1)
AC_CHECK_LIB([pq], [main],[PQ=-lpq],echo "Error: Required library pq
not found. Install it and try again" && exit 1)
AC_CHECK_LIB([pthread], [main],[PTHREAD=-lpthread],echo "Error:
Required library pthread not found. Install it and try again" && exit
1)
if test -e /usr/lib64/libresolv.a
then "echo checking for /usr/lib64/libresolv.a..yes"
else if test -e /usr/lib/libresolv.a
then echo "checking for /usr/lib/libresolv.a..yes"
else echo "It seems libresolv.a is missing.
Install the package that provides it" && exit 1
fi
fi
AC_HEADER_RESOLV
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h
string.h strings.h sys/ioctl.h sys/socket.h sys/time.h syslog.h
unistd.h])
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
AC_FUNC_MKTIME
AC_CHECK_FUNCS([gethostbyname localtime_r memmove memset regcomp
select socket strcasecmp strerror strncasecmp])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
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:
ls /usr/lib/mysql/
libdbug.a libmyisammrg.a libmysqlclient_r.so
libmysqlclient.so libmystrings.a mysqlbug
libheap.a libmysqlclient.a libmysqlclient_r.so.15
libmysqlclient.so.15 libmysys.a mysql_config
libmyisam.a libmysqlclient_r.a libmysqlclient_r.so.15.0.0
libmysqlclient.so.15.0.0 libvio.a
configure scripts complains:
checking for mysql_get_parameters in -lmysqlclient... no
Error: Required library mysqlclient not found. Install it and try again
Is there somthing wrong with my configure.ac?
You can read the config.log on http://pastebin.com/TMk91Rpi
Thanks in advance!
--
--
Sergio Belkin http://www.sergiobelkin.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
- AC_CHECK_LIB: Library is found on build host but is not on a target host,
Sergio Belkin <=