Archive Index This month's Index

Subject: questions about the autotools

questions about the autotools

From: Vincent Torri <>
Date: Sun, 13 Mar 2011 20:10:53 +0100


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:

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

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 : 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

thank you

Vincent Torri
Received on 2011-03-13