.so
configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([sm2.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(libalgor1.so,1.0)
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([memory.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
AC_PROG_LIBTOOL
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset])
AC_OUTPUT(Makefile)
Makefile.am
AUTOMAKE_OPTIONS=foreign
lib_LTLIBRARIES=libalgor1.la
libalgor1_la_SOURCES=\
algapi.c \
hash.c \
hmac.c \
sm2.c \
sm3.c \
alg1_mix.c \
LDFLAGS= -fPIC -shared -L/iwncomm/ac/target/lib -ldl -lpthread
INCLUDES=-I/iwncomm/ac/src/include -I/iwncomm/ac/src/include/openssl -I/iwncomm/ac/src/openssl/include
#moduledir=/iwncomm/ac/target/lib
其它
1.如果需要安装到非/usr/lib目录,需要在configure时设置
–pre-fix=/libdir
2.执行automake –add-missing时
configure.in:18: required file `build/ltmain.sh' not found
解决方案(libtoolize配置即可):
$libtoolize --version
-libtoolize (GNU libtool) 1.4.2
.....
$libtoolize --automake --copy --debug --force
.lib
configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([logApi.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(liblogApi.a,1.0)
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CHECK_FUNCS([memset select socket strerror])
AC_OUTPUT(Makefile)
Makefile.am
AUTOMAKE_OPTIONS=foreign
lib_LIBRARIES= liblogApi.a
liblogApi_a_SOURCES=logApi.c
INCLUDES=-I/iwncomm/ac/src/include/
CFLAGS=-Wall -Wconversion
libdir=/iwncomm/ac/target/lib
api
configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([iwn_db_wtpImageTable.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(db,1.0)
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
# FIXME: Replace `main' with a function in `-loamsIf':
AC_CHECK_LIB([oamsIf], [main])
# FIXME: Replace `main' with a function in `-lodbc':
AC_CHECK_LIB([odbc], [main])
# FIXME: Replace `main' with a function in `-lpthread':
AC_CHECK_LIB([pthread], [main])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strstr])
AC_OUTPUT(Makefile)
Makefile.am
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
pkgdatadir = $(datadir)/db
pkgincludedir = $(includedir)/db
pkglibdir = $(libdir)/db
pkglibexecdir = $(libexecdir)/db
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = iwndb$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING INSTALL depcomp install-sh \
missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(1datadir)" \
"$(DESTDIR)$(2datadir)" "$(DESTDIR)$(3datadir)" \
"$(DESTDIR)$(4datadir)"
PROGRAMS = $(bin_PROGRAMS)
am_iwndb_OBJECTS = iwn_oams_main.$(OBJEXT) \
iwn_db_interfaceManagerTable.$(OBJEXT) \
iwn_db_dnsCfgTable.$(OBJEXT) iwn_db_asCfgTable.$(OBJEXT) \
iwn_db_userBlackListTable.$(OBJEXT) iwn_db_main.$(OBJEXT) \
iwn_db_securitySceneTable.$(OBJEXT) \
iwn_db_usermanager.$(OBJEXT) iwn_db_common.$(OBJEXT) \
iwn_db_msgSendTable.$(OBJEXT) iwn_db_ssidTable.$(OBJEXT) \
iwn_db_wtpGroupTable.$(OBJEXT) iwn_db_dhcpPoolTable.$(OBJEXT) \
iwn_db_radioConfigTable.$(OBJEXT) iwn_db_syslogtable.$(OBJEXT) \
iwn_db_wtpImageTable.$(OBJEXT) \
iwn_db_dhcpSrvFlagTable.$(OBJEXT) \
iwn_db_rekeyCfgTable.$(OBJEXT) iwn_db_syslogCfgTable.$(OBJEXT) \
iwn_db_wtpListTable.$(OBJEXT) iwn_db_ipRouteTable.$(OBJEXT) \
iwn_db_rightManage.$(OBJEXT) iwn_db_wtpWlanTable.$(OBJEXT) \
iwn_db_onlineUsrListTable.$(OBJEXT) \
iwn_db_onlineWtpListTable.$(OBJEXT) \
iwn_db_vendorTable.$(OBJEXT) iwn_db_dhcpLeaseTable.$(OBJEXT) \
iwn_db_wtpOperateActionTable.$(OBJEXT) \
iwn_db_wtpOperateResultTable.$(OBJEXT) \
iwn_db_wtpStaticAddressTable.$(OBJEXT)
iwndb_OBJECTS = $(am_iwndb_OBJECTS)
iwndb_DEPENDENCIES =
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(iwndb_SOURCES)
DIST_SOURCES = $(iwndb_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*