给出以下autoconf片段:
if test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes" -a x"$ac_cv_type_struct_addrinfo" = x"yes"; then
# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
# something else so we must include <netdb.h> to get the
# redefinition.
AC_CHECK_FUNCS(getaddrinfo, ,
[AC_MSG_CHECKING([for getaddrinfo by including <netdb.h>])
AC_TRY_LINK([#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>],[getaddrinfo(NULL, NULL, NULL, NULL);],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GETADDRINFO, 1,
[Define to 1 if you have the "getaddrinfo" function and required types.])],
[AC_MSG_RESULT([no])
AC_LIBOBJ([getaddrinfo])])])
else
AC_LIBOBJ([getaddrinfo])
fi
Run Code Online (Sandbox Code Playgroud)
当运行一个autoconf
或autoreconf -fi
那个项目时,出现错误:
configure.ac:529: error: possibly undefined macro: AC_LIBOBJ
Run Code Online (Sandbox Code Playgroud)
指向第一次AC_LIBOBJ
出现。
相反,运行以下序列将起作用:
aclocal
autoreconf
Run Code Online (Sandbox Code Playgroud)
问题在于,在这个特定项目中,应该对configure-script进行命名configure.sh
(并使用包装器进行调用),所以我不得不改用以下顺序:
autoconf -o configure.sh
autoreconf
Run Code Online (Sandbox Code Playgroud)
总是会产生上述错误。
这是autoconf-2.69
加上我有以下的(相关)的选项设置:
AM_INIT_AUTOMAKE([subdir-objects tar-ustar foreign])
AC_CONFIG_LIBOBJ_DIR([lib])
Run Code Online (Sandbox Code Playgroud)
在将来的某个时候,我很可能会将整个检测替换为gnulib中包含的检测,但是目前,我希望将其保持原样。
归档时间: |
|
查看次数: |
1937 次 |
最近记录: |