Changeset 56

Show
Ignore:
Timestamp:
08/29/08 16:32:39 (3 months ago)
Author:
alonbl
Message:

New build system

Location:
trunk
Files:
8 added
5 removed
9 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      Makefile
      Makefile.in
      core
      archive
      acinclude.m4
      aclocal.m4
      autom4te.cache
      compile
      confdefs.h
      config.*
      configure
      conftest
      conftest.c
      depcomp
      install-sh
      libtool
      libtool.m4
      ltmain.sh
      missing
      mkinstalldirs
      so_locations
      stamp-h*

      .deps
      .libs
      .#*#
      .*.bak
      .*.orig
      .*.rej
      .*~
      #*#
      *.bak
      *.d
      *.def
      *.dll
      *.exe
      *.la
      *.lib
      *.lo
      *.orig
      *.pdb
      *.rej
      *.u
      *.rc
      *.pc
      *~
      *.gz
      *.bz2
      *.[0-9]
      *.html
      *.gif
      *.css
      *.out

      ChangeLog
  • trunk/Makefile.am

    r35 r56  
    1 # Process this file with automake to create Makefile.in 
    21 
    3 SUBDIRS = . aclocal src 
    4 DIST_SUBDIRS = . aclocal doc src 
    5  
    6 EXTRA_DIST = COPYING NEWS bootstrap 
     2AUTOMAKE_OPTIONS = foreign 1.10 
     3ACLOCAL_AMFLAGS = -I m4 
    74 
    85MAINTAINERCLEANFILES = \ 
    9         Makefile.in config.h.in configure \ 
    10         install-sh ltmain.sh missing mkinstalldirs \ 
    11         compile depcomp config.log config.status \ 
    12         config.guess config.sub acinclude.m4 aclocal.m4 
     6        config.log config.status \ 
     7        $(srcdir)/Makefile.in \ 
     8        $(srcdir)/config.h.in $(srcdir)/config.h.in~ $(srcdir)/configure \ 
     9        $(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \ 
     10        $(srcdir)/depcomp $(srcdir)/aclocal.m4 \ 
     11        $(srcdir)/config.guess $(srcdir)/config.sub \ 
     12        $(srcdir)/m4/ltsugar.m4 $(srcdir)/m4/libtool.m4 \ 
     13        $(srcdir)/m4/ltversion.m4 $(srcdir)/m4/lt~obsolete.m4 \ 
     14        $(srcdir)/m4/ltoptions.m4 \ 
     15        $(srcdir)/packaged 
     16EXTRA_DIST = svnignore 
    1317 
    14 DEPCLEANFILES = config.log configure 
     18SUBDIRS = src doc 
    1519 
    16 AUTOMAKE_OPTIONS = foreign 1.5 
    17 ACLOCAL_AMFLAGS = -I aclocal 
     20dist_noinst_SCRIPTS = bootstrap 
     21dist_doc_DATA = NEWS 
     22 
     23# Allow detection of packaged tarball 
     24dist-hook: 
     25        $(MKDIR_P) "$(distdir)/m4" 
     26        echo > "$(distdir)/packaged" 
  • trunk/NEWS

    r52 r56  
    11NEWS for Pam_p11 -- History of user visible changes 
     2 
     3New in 0.1.6; ????-??-??; Andreas Jellinghaus 
     4* Build system rewritten (NOTICE: configure options was modified).  
    25 
    36New in 0.1.5; 2008-08-27; Andreas Jellinghaus 
  • trunk/bootstrap

    r17 r56  
    88rm -rf *~ *.cache *.m4 config.guess config.log \ 
    99        config.status config.sub depcomp ltmain.sh 
    10 autoreconf --verbose --install 
     10autoreconf --verbose --install --force 
  • trunk/configure.ac

    r53 r56  
    1 # $Id$ 
    2  
    3 # Require autoconf 2.52 
    4 AC_PREREQ(2.52) 
    5  
    6 # Process this file with autoconf to produce a configure script. 
    7 AC_INIT(pam_p11,[0.1.5-svn]) 
     1 
     2AC_PREREQ(2.60) 
     3 
     4define([PACKAGE_VERSION_MAJOR], [0]) 
     5define([PACKAGE_VERSION_MINOR], [1]) 
     6define([PACKAGE_VERSION_FIX], [5]) 
     7 
     8AC_INIT([pam_p11],[PACKAGE_VERSION_MAJOR.PACKAGE_VERSION_MINOR.PACKAGE_VERSION_FIX-svn]) 
     9AC_CONFIG_AUX_DIR([.]) 
     10AM_CONFIG_HEADER([config.h]) 
     11AC_CONFIG_MACRO_DIR([m4]) 
     12AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}]) 
     13 
    814AC_CONFIG_SRCDIR([src/pam_p11.c]) 
    9 AC_CANONICAL_TARGET([]) 
    10 AM_INIT_AUTOMAKE 
    11  
    12 AM_MAINTAINER_MODE 
    13  
    14 # Checks for programs. 
     15 
     16AC_CANONICAL_HOST 
    1517AC_PROG_CC 
    16 AC_PROG_CXX 
    17 AC_PROG_LIBTOOL 
     18PKG_PROG_PKG_CONFIG 
     19AC_C_BIGENDIAN 
     20 
     21AC_MSG_CHECKING([svn checkout]) 
     22if test -e packaged; then 
     23        svn_checkout="no" 
     24else 
     25        svn_checkout="yes" 
     26fi 
     27AC_MSG_RESULT([${svn_checkout}]) 
     28 
     29AC_ARG_ENABLE( 
     30        [strict], 
     31        [AS_HELP_STRING([--enable-strict],[enable strict compile mode @<:@disabled@:>@])], 
     32        , 
     33        [enable_strict="no"] 
     34) 
     35 
     36AC_ARG_ENABLE( 
     37        [pedantic], 
     38        [AS_HELP_STRING([--enable-pedantic],[enable pedantic compile mode @<:@disabled@:>@])], 
     39        , 
     40        [enable_pedantic="no"] 
     41) 
     42 
     43AC_ARG_ENABLE( 
     44        [doc], 
     45        [AS_HELP_STRING([--enable-doc],[enable installation of documents @<:@disabled@:>@])], 
     46        , 
     47        [enable_doc="no"] 
     48) 
     49 
     50AC_ARG_WITH( 
     51        [pamdir], 
     52        [AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored])], 
     53        [pamdir="${withval}"], 
     54        [ 
     55                if test "${prefix}" = "/usr"; then 
     56                        pamdir="/lib${libdir##*/lib}/security" 
     57                else 
     58                        pamdir="\$(libdir)/security" 
     59                fi 
     60        ] 
     61) 
     62 
     63dnl Checks for programs. 
     64AC_PROG_CPP 
    1865AC_PROG_INSTALL 
    1966AC_PROG_LN_S 
    20  
    21 # Checks for header files. 
     67AC_PROG_MKDIR_P 
     68AC_PROG_SED 
     69AC_PROG_MAKE_SET 
     70 
     71dnl Add libtool support. 
     72ifdef( 
     73        [LT_INIT], 
     74        [LT_INIT], 
     75        [AC_PROG_LIBTOOL] 
     76) 
     77 
     78dnl Checks for header files. 
    2279AC_HEADER_STDC 
    23 AC_CHECK_HEADERS([string.h syslog.h fcntl.h unistd.h security/pam_ext.h]) 
    24  
    25 # Checks for typedefs, structures, and compiler characteristics. 
    26 AC_C_CONST 
     80AC_HEADER_SYS_WAIT 
     81AC_CHECK_HEADERS([ \ 
     82        string.h syslog.h fcntl.h unistd.h security/pam_ext.h \ 
     83]) 
    2784AC_TYPE_SIZE_T 
    28  
    29 # Checks for library functions. 
    3085AC_FUNC_MALLOC 
    3186AC_FUNC_REALLOC 
     
    3489AC_CHECK_FUNCS([memset strdup strerror]) 
    3590 
    36 # Checks for libraries. 
    37 AC_CHECK_LIB(pam, pam_get_item, , AC_MSG_ERROR(could not locate pam libraries)) 
    38  
    39 # Check and set OpenSSL paths 
    40 PKG_CHECK_MODULES(OPENSSL, openssl, [], [ AC_MSG_ERROR(openssl not found) ]) 
    41 PKG_CHECK_MODULES(LIBP11, libp11, [], [ AC_MSG_ERROR(libp11 not found) ]) 
    42  
    43 AC_CONFIG_FILES([  
    44 Makefile 
    45 aclocal/Makefile 
    46 doc/Makefile 
    47 src/Makefile 
     91PKG_CHECK_MODULES([LIBP11], [libp11 >= 0.2.4],, [AC_MSG_ERROR([libp11 is required])]) 
     92PKG_CHECK_MODULES( 
     93        [OPENSSL], 
     94        [libcrypto >= 0.9.7], 
     95        , 
     96        [PKG_CHECK_MODULES( 
     97                [OPENSSL], 
     98                [openssl >= 0.9.7], 
     99                , 
     100                [AC_CHECK_LIB( 
     101                        [crypto], 
     102                        [RSA_version], 
     103                        [OPENSSL_LIBS="-lcrypto"], 
     104                        [AC_MSG_ERROR([Cannot find OpenSSL])] 
     105                )] 
     106        )] 
     107) 
     108 
     109dnl These required for svn checkout 
     110AC_ARG_VAR([XSLTPROC], [xsltproc utility]) 
     111AC_ARG_VAR([SVN], [subversion utility]) 
     112AC_ARG_VAR([WGET], [wget utility]) 
     113AC_ARG_VAR([WGET_OPTS], [wget options]) 
     114AC_ARG_VAR([TR], [tr utility]) 
     115AC_CHECK_PROGS([XSLTPROC],[xsltproc]) 
     116AC_CHECK_PROGS([SVN],[svn]) 
     117AC_CHECK_PROGS([WGET],[wget]) 
     118AC_CHECK_PROGS([TR],[tr]) 
     119test -z "${WGET_OPTS}" && WGET_OPTS="-nv" 
     120 
     121dnl svn checkout dependencies 
     122if test "${svn_checkout}" = "yes"; then 
     123        AC_MSG_CHECKING([XSLTPROC requirement]) 
     124        if test -n "${XSLTPROC}"; then 
     125                AC_MSG_RESULT([ok]) 
     126        else 
     127                if test "${enable_doc}" = "yes"; then 
     128                        AC_MSG_ERROR([Missing XSLTPROC svn build with doc]) 
     129                else 
     130                        AC_MSG_WARN(["make dist" will not work]) 
     131                fi 
     132        fi 
     133 
     134        AC_MSG_CHECKING([svn doc build dependencies]) 
     135        if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then 
     136                AC_MSG_RESULT([ok]) 
     137        else 
     138                if test "${enable_doc}" = "yes"; then 
     139                        AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build]) 
     140                else 
     141                        AC_MSG_WARN(["make dist" will not work]) 
     142                fi 
     143        fi 
     144fi 
     145 
     146if test -z "${PAM_LIBS}"; then 
     147        AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam]) 
     148        AC_ARG_VAR([PAM_LIBS], [linker flags for pam]) 
     149        AC_CHECK_LIB( 
     150                [pam], 
     151                [pam_authenticate], 
     152                [PAM_LIBS="-lpam"], 
     153                [AC_MSG_ERROR([Cannot find pam])] 
     154        ) 
     155fi 
     156 
     157AC_SUBST([pamdir]) 
     158 
     159AM_CONDITIONAL([SVN_CHECKOUT], [test "${svn_checkout}" = "yes"]) 
     160AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"]) 
     161 
     162if test "${enable_pedantic}" = "yes"; then 
     163        enable_strict="yes"; 
     164        CFLAGS="${CFLAGS} -pedantic" 
     165fi 
     166if test "${enable_strict}" = "yes"; then 
     167        CFLAGS="${CFLAGS} -Wall -Wextra" 
     168fi 
     169 
     170AC_CONFIG_FILES([ 
     171        Makefile 
     172        doc/Makefile 
     173        doc/nonpersistent/Makefile 
     174        src/Makefile 
    48175]) 
    49176AC_OUTPUT 
     177 
     178cat <<EOF 
     179 
     180pam_p11 has been configured with the following options: 
     181 
     182 
     183Version:                 ${PACKAGE_VERSION} 
     184Libraries:               $(eval eval eval echo "${libdir}") 
     185 
     186doc support:             ${enable_doc} 
     187 
     188Host:                    ${host} 
     189Compiler:                ${CC} 
     190Preprocessor flags:      ${CPPFLAGS} 
     191Compiler flags:          ${CFLAGS} 
     192Linker flags:            ${LDFLAGS} 
     193Libraries:               ${LIBS} 
     194 
     195pamdir                   ${pamdir} 
     196 
     197PAM_CFLAGS:              ${PAM_CFLAGS} 
     198PAM_LIBS:                ${PAM_LIBS} 
     199LIBP11_CFLAGS:           ${LIBP11_CFLAGS} 
     200LIBP11_LIBS:             ${LIBP11_LIBS} 
     201OPENSSL_CFLAGS:          ${OPENSSL_CFLAGS} 
     202OPENSSL_LIBS:            ${OPENSSL_LIBS} 
     203 
     204EOF 
  • trunk/doc

    • Property svn:ignore set to
      Makefile
      Makefile.in
      core
      archive
      acinclude.m4
      aclocal.m4
      autom4te.cache
      compile
      confdefs.h
      config.*
      configure
      conftest
      conftest.c
      depcomp
      install-sh
      libtool
      libtool.m4
      ltmain.sh
      missing
      mkinstalldirs
      so_locations
      stamp-h*

      .deps
      .libs
      .#*#
      .*.bak
      .*.orig
      .*.rej
      .*~
      #*#
      *.bak
      *.d
      *.def
      *.dll
      *.exe
      *.la
      *.lib
      *.lo
      *.orig
      *.pdb
      *.rej
      *.u
      *.rc
      *.pc
      *~
      *.gz
      *.bz2
      *.[0-9]
      *.html
      *.gif
      *.css
      *.out

      ChangeLog
  • trunk/doc/Makefile.am

    r20 r56  
    1 # Process this file with automake to create Makefile.in 
     1MAINTAINERCLEANFILES = $(srcdir)/Makefile.in 
    22 
    3 MAINTAINERCLEANFILES = Makefile.in $(HTML) ChangeLog 
     3if ENABLE_DOC 
     4SUBDIRS = nonpersistent 
     5endif 
     6DIST_SUBDIRS = nonpersistent 
    47 
    5 EXTRA_DIST = README export-wiki.sh export-wiki.xsl $(HTML) index.html ChangeLog 
    6  
    7 HTML= $(shell ls $(srcdir)/*.html $(srcdir)/*.css) 
    8  
    9 index.html: 
    10         sh $(srcdir)/export-wiki.sh $(srcdir) 
    11  
    12 ChangeLog: 
    13         sh $(srcdir)/changelog.sh $(srcdir) 
     8dist_doc_DATA = README 
  • trunk/src

    • Property svn:ignore set to
      Makefile
      Makefile.in
      core
      archive
      acinclude.m4
      aclocal.m4
      autom4te.cache
      compile
      confdefs.h
      config.*
      configure
      conftest
      conftest.c
      depcomp
      install-sh
      libtool
      libtool.m4
      ltmain.sh
      missing
      mkinstalldirs
      so_locations
      stamp-h*

      .deps
      .libs
      .#*#
      .*.bak
      .*.orig
      .*.rej
      .*~
      #*#
      *.bak
      *.d
      *.def
      *.dll
      *.exe
      *.la
      *.lib
      *.lo
      *.orig
      *.pdb
      *.rej
      *.u
      *.rc
      *.pc
      *~
      *.gz
      *.bz2
      *.[0-9]
      *.html
      *.gif
      *.css
      *.out

      ChangeLog
  • trunk/src/Makefile.am

    r42 r56  
    1 # Process this file with automake to create Makefile.in 
     1MAINTAINERCLEANFILES = $(srcdir)/Makefile.in 
    22 
    3 MAINTAINERCLEANFILES = Makefile.in 
     3EXTRA_DIST = test.c 
    44 
    5 AM_CFLAGS = -Wall -fno-strict-aliasing $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS) 
    6 AM_LDFLAGS = -module -avoid-version 
     5AM_CFLAGS = $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS) $(PAM_CFLAGS) 
     6LIBS = $(OPENSSL_LIBS) $(LIBP11_LIBS) $(PAM_LIBS) 
     7AM_LDFLAGS = -module -avoid-version -shared -no-undefined \ 
     8        -export-symbols "$(srcdir)/pam_p11.exports" 
    79 
    8 lib_LTLIBRARIES = pam_p11_openssh.la  pam_p11_opensc.la  
     10pam_LTLIBRARIES = pam_p11_openssh.la  pam_p11_opensc.la  
    911 
    10 pam_p11_openssh_la_SOURCES =  pam_p11.c base64.c match_openssh.c 
    11 pam_p11_openssh_la_LIBADD = $(OPENSSL_LIBS) $(LIBP11_LIBS)  
     12# Needed until libtool-2 
     13install-data-hook:      install-pamLTLIBRARIES 
     14        rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.la" 
     15        rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.a" 
     16        rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.la" 
     17        rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.a" 
     18uninstall-local: 
     19        rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.so" 
     20        rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.so" 
    1221 
    13 pam_p11_opensc_la_SOURCES =  pam_p11.c match_opensc.c 
    14 pam_p11_opensc_la_LIBADD = $(OPENSSL_LIBS) $(LIBP11_LIBS)  
    15  
    16 noinst_PROGRAMS= test 
    17  
    18 test_SOURCES=test.c 
    19 test_LDADD=pam_p11_openssh.la 
     22pam_p11_openssh_la_SOURCES =  pam_p11.c base64.c match_openssh.c \ 
     23        pam_p11.exports 
     24pam_p11_opensc_la_SOURCES =  pam_p11.c match_opensc.c \ 
     25        pam_p11.exports 
    2026 
    2127format: 
    2228        indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.h 
    23  
    24 install:        
    25         $(mkinstalldirs) $(DESTDIR)/$(libdir)/security 
    26         $(libLTLIBRARIES_INSTALL) $(top_builddir)/src/.libs/pam_p11_openssh.so $(DESTDIR)/$(libdir)/security 
    27         $(libLTLIBRARIES_INSTALL) $(top_builddir)/src/.libs/pam_p11_opensc.so $(DESTDIR)/$(libdir)/security 
    28  
    29 uninstall:        
    30         $(RM) $(DESTDIR)/$(libdir)/security/pam_p11_openssh.so  
    31         $(RM) $(DESTDIR)/$(libdir)/security/pam_p11_opensc.so  
    32         @ rmdir $(DESTDIR)/$(libdir)/security