LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 839|回复: 1

在下刚学习在linux下的编程,在学习autoconf时遇到一个问题,麻烦高手们帮忙看看怎么了

[复制链接]
发表于 2004-5-2 12:37:56 | 显示全部楼层 |阅读模式
我的configure.in的文件如下:
(源程序bogusapp.c也在这个目录下)。
dnl Autoconfigure script for bogusapp
dnl xuyufeng
dnl
dnl Process this file with 'autoconf' to produce a 'configure'script

AC_INIT(bogusapp.c)
AC_CONFIG_HEADER(config.h)

test -z "$LDFLAGS" && LDFLAGS="-I/usr/include" AC_SUBST(LDFLAGS)

dnl Tests for UNIX variants
dnl
AC_CANONICAL_HOST

dnl Tests for programs
dnl
AC_PROG_CC
AC_PROG_LEX
AC_PROG_AWK
AC_PROG_YACC
AC_CHECK_PROG(SHELL,bash,/bin/bash/,/bin/sh)

dnl Tests for libraries
dnl
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(resolv,res_init,[echo "res_init() not in libresolv"],
[echo "res_init() found in libresove"])

dnl Tests for header files
dnl
AC_CHECK_HEADER(killer.h)
AC_CHECK_HEADERS([resolv.h temio.h curses.h sys/time.h fcntl.h sys/fcntl.h \
memory.h])
AC_DECL_SYS_SIGLIST
AC_HEADER_STDC

dnl Tests for typedefs
dnl
AC_TYPE_GETGROUPS
AC_TYPE_SIZE_T
AC_TYPE_PID_T

dnl Tests for structures
AC_HEADER_TIME
AC_STRUCT_TIMEZONE

dnl Tests of compiler behavior
dnl
AC_C_BIGENDIAN
AC_C_INLINE
AC_CHECK_SIZEOF(int, 32)

dnl Tests for library functions
dnl
AC_FUNC_GETLOADAVG
AC_FUNC_MMAP
AC_FUNC_UTIME_NULL
AC_FUNC_VFORK

dnl Tests of system services
dnl
AC_SYS_INTERPRETER
AC_PATH_X
AC_SYS_RESTARTABLE_SYSCALLS

dnl Tests in this section exercise a few of 'autoconf' 's generic macros
dnl
dnl First,let's see if we have a usable void pointer type
dnl
AC_MSG_CHECKING(for a usable void pointer type)
AC_TRY_COMPILE([],
        [ char *ptr;
          void *xmalloc();
          ptr=(char *) xmalloc(1);
        ],
        [AC_DEFINE(HAVE_VOID_POINTER) AC_MSG_RESULT(usable void pointer)])

dnl Next, we test the linker
dnl
AC_TRY_LINK(#ifndef HAVE_UNISTD_H
#include <signal.h>
#endif],
[char *ret=*(sys_siglist+1);],
[AC_DEFINE(HAVE_SYS_SIGLIST),AC_MSG_RESULT(got sys_siglist)],
[AC_MSG_RESULT(no sys_siglist)])

dnl Finally,set a default value for a ridiculous type
dnl
AC_CHECK_TYPE(short_short_t,unsigned short)

dnl Okey, we're done,Create the output files and get out fo here
dnl
AC_OUTPUT(Makefile)
然后运行autoconf生成configure的shell脚本后执行后出现如下的错误:
loading cache ./config.cache
configure:error:can not find install-sh or install.sh in . ./.. ./../..
请问是怎么回事?
谢谢!
发表于 2004-5-2 15:46:41 | 显示全部楼层
你还需要编辑一个Makefile.am, 再执行automake -a, 就会生成所需要的文件. 具体的用法可以参考置顶的论坛索引.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表