Show
Ignore:
Timestamp:
03/06/08 16:06:59 (10 months ago)
Author:
alonbl
Message:

Complete rewrite of OpenSC build system.

1. Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2. Ability to explicitly disable and enable dependencies of the package.
3. openct, pcsc and nsplugins features are disabled by default.
4. Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5. --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6. Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7. Add--enable-doc configuration option, allow installing documentation into target.
8. Add --disable-man configuration option, allow msys mingw32 users to

build from svn without extra dependencies.

9. Add export files to each library in order to export only required symbols.

Windows native build may use these files instead of scanning objects' symbols.

10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the

same source files in different places.

12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.

Alon Bar-Lev

svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw

_M .
D configure.in
_M src
_M src/openssh
M src/openssh/Makefile.am
_M src/tools
M src/tools/rutoken-tool.c
M src/tools/opensc-tool.c
M src/tools/cardos-info.c
M src/tools/pkcs15-crypt.c
M src/tools/pkcs15-init.c
M src/tools/piv-tool.c
M src/tools/netkey-tool.c
M src/tools/eidenv.c
M src/tools/cryptoflex-tool.c
M src/tools/util.c
M src/tools/pkcs11-tool.c
M src/tools/pkcs15-tool.c
M src/tools/util.h
M src/tools/opensc-explorer.c
M src/tools/Makefile.am
_M src/pkcs11
M src/pkcs11/pkcs11-global.c
M src/pkcs11/framework-pkcs15.c
M src/pkcs11/mechanism.c
M src/pkcs11/pkcs11-display.c
M src/pkcs11/pkcs11-object.c
A src/pkcs11/opensc-pkcs11.exports
M src/pkcs11/sc-pkcs11.h
M src/pkcs11/pkcs11-spy.c
M src/pkcs11/openssl.c
M src/pkcs11/Makefile.am
A src/pkcs11/pkcs11-spy.exports
_M src/tests
_M src/tests/regression
M src/tests/regression/Makefile.am
M src/tests/sc-test.c
M src/tests/pintest.c
M src/tests/Makefile.am
_M src/include
_M src/include/opensc
M src/include/opensc/Makefile.am
A src/include/opensc/svnignore
M src/include/Makefile.am
_M src/signer
_M src/signer/npinclude
M src/signer/npinclude/Makefile.am
M src/signer/Makefile.am
A src/signer/signer.exports
_M src/common
A src/common/compat_dummy.c
D src/common/getopt.txt
D src/common/strlcpy.c
D src/common/LICENSE
A src/common/compat_getopt.txt
A src/common/compat_strlcpy.c
A src/common/LICENSE.compat_getopt
A src/common/compat_getopt.c
D src/common/strlcpy.h
D src/common/ChangeLog
D src/common/getpass.c
D src/common/my_getopt.c
A src/common/compat_strlcpy.h
A src/common/compat_getpass.c
A src/common/compat_getopt.h
A src/common/ChangeLog.compat_getopt
D src/common/README.strlcpy
D src/common/my_getopt.h
A src/common/compat_getpass.h
A src/common/README.compat_strlcpy
D src/common/strlcpy.3
A src/common/README.compat_getopt
D src/common/getopt.3
D src/common/README.my_getopt
A src/common/compat_strlcpy.3
A src/common/compat_getopt.3
M src/common/Makefile.am
M src/Makefile.am
_M src/pkcs15init
M src/pkcs15init/pkcs15-oberthur.c
M src/pkcs15init/profile.c
M src/pkcs15init/pkcs15-lib.c
M src/pkcs15init/pkcs15-rutoken.c
A src/pkcs15init/pkcs15init.exports
M src/pkcs15init/pkcs15-gpk.c
M src/pkcs15init/Makefile.am
_M src/scconf
M src/scconf/Makefile.am
M src/scconf/parse.c
A src/scconf/scconf.exports
_M src/libopensc
M src/libopensc/card-rutoken.c
M src/libopensc/compression.c
M src/libopensc/sc.c
M src/libopensc/card-piv.c
M src/libopensc/pkcs15-openpgp.c
M src/libopensc/pkcs15-postecert.c
M src/libopensc/pkcs15-tcos.c
M src/libopensc/opensc-config.in
M src/libopensc/reader-pcsc.c
A src/libopensc/internal-winscard.h
M src/libopensc/ctx.c
A src/libopensc/libopensc.exports
M src/libopensc/pkcs15-piv.c
M src/libopensc/pkcs15-infocamere.c
M src/libopensc/internal.h
M src/libopensc/pkcs15-actalis.c
M src/libopensc/pkcs15-starcert.c
M src/libopensc/card-oberthur.c
M src/libopensc/pkcs15-atrust-acos.c
M src/libopensc/p15card-helper.c
D src/libopensc/part10.h
M src/libopensc/ui.c
M src/libopensc/card-gpk.c
M src/libopensc/pkcs15-wrap.c
M src/libopensc/pkcs15-gemsafeGPK.c
M src/libopensc/log.c
M src/libopensc/pkcs15-esteid.c
M src/libopensc/pkcs15-prkey-rutoken.c
M src/libopensc/log.h
M src/libopensc/Makefile.am
M src/libopensc/reader-openct.c
_M aclocal
M aclocal/Makefile.am
_M win32
M win32/Makefile.am
A win32/versioninfo.rc.in
A win32/ltrc.inc
A configure.ac
_M doc
_M doc/tools
M doc/tools/pkcs15-profile.xml
D doc/changelog.sh
D doc/export-wiki.xsl
_M doc/api
_M doc/api/file
M doc/api/man.xsl
_M doc/api/asn1
_M doc/api/apps
_M doc/api/init
_M doc/api/types
_M doc/api/card
M doc/api/html.xsl
_M doc/api/misc
_M doc/api/util
M doc/Makefile.am
D doc/export-wiki.sh
AM doc/nonpersistent
A doc/nonpersistent/export-wiki.xsl
A doc/nonpersistent/Makefile.am
A doc/nonpersistent/export-wiki.sh
A doc/nonpersistent/svn2cl.xsl
D doc/generate-man.sh
D doc/svn2cl.xsl
M Makefile.am
A svnignore
_M etc
M etc/opensc.conf.in
M etc/Makefile.am
D man
_M solaris
M solaris/Makefile

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
        26 archive 
        27 acinclude.m4 
        28 aclocal.m4 
        29 autom4te.cache 
        30 compile 
        31 confdefs.h 
        32 config.cache 
        33 config.guess 
        34 config.h 
        35 config.h.in 
        36 config.log 
        37 config.status 
        38 config.sub 
        39 configure 
        40 conftest 
        41 conftest.c 
        42 depcomp 
        43 install-sh 
        44 libtool 
        45 libtool.m4 
        46 ltmain.sh 
        47 missing 
        48 mkinstalldirs 
        49 so_locations 
        50 stamp-h* 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
         64eidenv 
         65opensc-explorer 
         66opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
         71pkcs11-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
         64eidenv 
         65opensc-explorer 
         66opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
         71pkcs11-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src/tools

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
        26 cryptoflex-tool 
        27 cardos-info 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
        2864eidenv 
        29 piv-tool 
        30 netkey-tool 
        3165opensc-explorer 
        3266opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
        3371pkcs11-tool 
        34 pkcs15-crypt 
        35 pkcs15-init 
        36 pkcs15-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src/tools/opensc-explorer.c

    r3309 r3405  
    2828#include <opensc/opensc.h> 
    2929#include <opensc/asn1.h> 
    30 #ifdef HAVE_READLINE_READLINE_H 
     30#ifdef ENABLE_READLINE 
    3131#include <readline/readline.h> 
    3232#include <readline/history.h> 
     
    118118        fprintf(stderr, "%s: %s\n", err, sc_strerror(r)); 
    119119        if (r == SC_ERROR_SECURITY_STATUS_NOT_SATISFIED) 
    120                 fprintf(stderr, "ACL for operation: %s\n", acl_to_str(sc_file_get_acl_entry(file, op))); 
     120                fprintf(stderr, "ACL for operation: %s\n", util_acl_to_str(sc_file_get_acl_entry(file, op))); 
    121121} 
    122122 
     
    190190        if (file->namelen) { 
    191191                printf("\tName: "); 
    192                 print_binary(stdout, file->name, file->namelen); 
     192                util_print_binary(stdout, file->name, file->namelen); 
    193193        } 
    194194        printf("\n"); 
     
    301301} 
    302302 
    303 static int read_and_print_binary_file(sc_file_t *file) 
     303static int read_and_util_print_binary_file(sc_file_t *file) 
    304304{ 
    305305        unsigned int idx = 0; 
     
    323323                if ((r == 0) && (card->caps & SC_CARD_CAP_NO_FCI)) 
    324324                        break; 
    325                 hex_dump_asc(stdout, buf, r, idx); 
     325                util_hex_dump_asc(stdout, buf, r, idx); 
    326326                idx += r; 
    327327                count -= r; 
     
    346346                } 
    347347                printf("Record %d:\n", rec); 
    348                 hex_dump_asc(stdout, buf, r, 0); 
     348                util_hex_dump_asc(stdout, buf, r, 0); 
    349349        } 
    350350} 
     
    379379        } 
    380380        if (file->ef_structure == SC_FILE_EF_TRANSPARENT) 
    381                 read_and_print_binary_file(file); 
     381                read_and_util_print_binary_file(file); 
    382382        else 
    383383                read_and_print_record_file(file); 
     
    449449                if (file->namelen) { 
    450450                        printf("%-15s", "DF name:"); 
    451                         print_binary(stdout, file->name, file->namelen); 
     451                        util_print_binary(stdout, file->name, file->namelen); 
    452452                        printf("\n"); 
    453453                } 
     
    456456                         
    457457                        sprintf(buf, "ACL for %s:", ops[i]); 
    458                         printf("%-25s%s\n", buf, acl_to_str(sc_file_get_acl_entry(file, i))); 
     458                        printf("%-25s%s\n", buf, util_acl_to_str(sc_file_get_acl_entry(file, i))); 
    459459                } 
    460460        } else { 
     
    473473                         
    474474                        sprintf(buf, "ACL for %s:", ops[i]); 
    475                         printf("%-25s%s\n", buf, acl_to_str(sc_file_get_acl_entry(file, i))); 
     475                        printf("%-25s%s\n", buf, util_acl_to_str(sc_file_get_acl_entry(file, i))); 
    476476                } 
    477477        }        
     
    12591259                return -1; 
    12601260        } 
    1261         hex_dump_asc(stdout, outdata, r, -1); 
     1261        util_hex_dump_asc(stdout, outdata, r, -1); 
    12621262        printf ("Done.\n"); 
    12631263        return 0; 
     
    13231323                return -1; 
    13241324        } 
    1325         hex_dump_asc (stdout, outdata, r, -1); 
     1325        util_hex_dump_asc (stdout, outdata, r, -1); 
    13261326        printf("Done.\n"); 
    13271327        return 0; 
     
    13731373        } 
    13741374 
    1375         hex_dump_asc(stdout, buffer, count, 0); 
     1375        util_hex_dump_asc(stdout, buffer, count, 0); 
    13761376        return 0; 
    13771377 
     
    14091409        } else { 
    14101410                printf("Object %04x:\n", tag & 0xFFFF); 
    1411                 hex_dump_asc(stdout, buffer, r, 0); 
     1411                util_hex_dump_asc(stdout, buffer, r, 0); 
    14121412        } 
    14131413 
     
    15061506               apdu.resplen ? ":" : ""); 
    15071507        if (apdu.resplen) 
    1508                 hex_dump_asc(stdout, apdu.resp, apdu.resplen, -1); 
     1508                util_hex_dump_asc(stdout, apdu.resp, apdu.resplen, -1); 
    15091509 
    15101510        return 0; 
     
    16621662                initialized = 1; 
    16631663                interactive = isatty(fileno(stdin)); 
    1664 #ifdef HAVE_READLINE 
     1664#ifdef ENABLE_READLINE 
    16651665                if (interactive) 
    16661666                        using_history (); 
    16671667#endif 
    16681668        } 
    1669 #ifdef HAVE_READLINE 
     1669#ifdef ENABLE_READLINE 
    16701670        if (interactive) { 
    16711671                char *line = readline(prompt); 
     
    16771677        /* Either we don't have readline or we are not running 
    16781678           interactively */ 
    1679 #ifndef HAVE_READLINE 
     1679#ifndef ENABLE_READLINE 
    16801680        printf("%s", prompt); 
    16811681#endif 
     
    17051705                        break; 
    17061706                if (c == '?') 
    1707                         print_usage_and_die(app_name, options, option_help); 
     1707                        util_print_usage_and_die(app_name, options, option_help); 
    17081708                switch (c) { 
    17091709                case 'r': 
     
    17431743        } 
    17441744 
    1745         err = connect_card(ctx, &card, opt_reader, 0, opt_wait, 0); 
     1745        err = util_connect_card(ctx, &card, opt_reader, 0, opt_wait, 0); 
    17461746        if (err) 
    17471747                goto end;