Hey
Here are some questions about the autotools. Can you please comment them ?
1) Where are grep, grep -E and ar used in the autotools ? It is said that it
is needed by libtool, but libtool is perfectly capable of checking the
availability of the tools. Actually, these tests are useless and are just
making configure slower.
2) Instead of your sed check, what about using AC_PROG_SED ?
3) The current use of AM_INIT_AUTOMAKE is deprecated. See:
http://www.gnu.org/software/automake/manual/automake.html#Public-Macros
In addition, you don't need the version in ares_ver.h as it is already
defined by AC_INIT
4) There is a check to build static libraries with PIC on AMD64-Linux &
FreeBSD. what about calling AC_ENABLE_STATIC for those platforms ?
5) For Windows desktop, if winsock2 header is available, you do
if test "$ac_cv_header_winsock2_h" = "yes"; then
winsock_LIB="-lws2_32"
fi
you don't check here the Windows CE platform. In that case the library is
libws2.a, i.e. you have to set winsock_LIB to -lws2
6) ssize_t is defined on Windows and it is named SSIZE_T :
http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx Better using
that instead of the check in config-win32.h, that is, if
AC_CHECK_TYPE(ssize_t, ,
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
fails, then check for SSIZE_T.
7) You use LIBS to defined the value of the Libs.private entry of
libcares.pc. It is a bad idea as LIBS is an environment variable that can be
used by the user to define additional linker -l flags. Why not using
directly CARES_PRIVATE_LIBS ?
thank you
Vincent Torri
Received on 2011-03-13