# # # delete "botan/build.h" # # rename "botan/aes.cpp" # to "botan/src/aes.cpp" # # rename "botan/aes.h" # to "botan/include/aes.h" # # rename "botan/aes_tab.cpp" # to "botan/src/aes_tab.cpp" # # rename "botan/alg_id.cpp" # to "botan/src/alg_id.cpp" # # rename "botan/alg_id.h" # to "botan/include/alg_id.h" # # rename "botan/allocate.h" # to "botan/include/allocate.h" # # rename "botan/arc4.cpp" # to "botan/src/arc4.cpp" # # rename "botan/arc4.h" # to "botan/include/arc4.h" # # rename "botan/asn1_alt.cpp" # to "botan/src/asn1_alt.cpp" # # rename "botan/asn1_att.cpp" # to "botan/src/asn1_att.cpp" # # rename "botan/asn1_dn.cpp" # to "botan/src/asn1_dn.cpp" # # rename "botan/asn1_int.cpp" # to "botan/src/asn1_int.cpp" # # rename "botan/asn1_int.h" # to "botan/include/asn1_int.h" # # rename "botan/asn1_ku.cpp" # to "botan/src/asn1_ku.cpp" # # rename "botan/asn1_obj.h" # to "botan/include/asn1_obj.h" # # rename "botan/asn1_oid.cpp" # to "botan/src/asn1_oid.cpp" # # rename "botan/asn1_oid.h" # to "botan/include/asn1_oid.h" # # rename "botan/asn1_str.cpp" # to "botan/src/asn1_str.cpp" # # rename "botan/asn1_tm.cpp" # to "botan/src/asn1_tm.cpp" # # rename "botan/base.cpp" # to "botan/src/base.cpp" # # rename "botan/base.h" # to "botan/include/base.h" # # rename "botan/basefilt.cpp" # to "botan/src/basefilt.cpp" # # rename "botan/basefilt.h" # to "botan/include/basefilt.h" # # rename "botan/ber_dec.cpp" # to "botan/src/ber_dec.cpp" # # rename "botan/ber_dec.h" # to "botan/include/ber_dec.h" # # rename "botan/big_base.cpp" # to "botan/src/big_base.cpp" # # rename "botan/big_code.cpp" # to "botan/src/big_code.cpp" # # rename "botan/big_io.cpp" # to "botan/src/big_io.cpp" # # rename "botan/big_ops2.cpp" # to "botan/src/big_ops2.cpp" # # rename "botan/big_ops3.cpp" # to "botan/src/big_ops3.cpp" # # rename "botan/big_rand.cpp" # to "botan/src/big_rand.cpp" # # rename "botan/bigint.h" # to "botan/include/bigint.h" # # rename "botan/bit_ops.cpp" # to "botan/src/bit_ops.cpp" # # rename "botan/bit_ops.h" # to "botan/include/bit_ops.h" # # rename "botan/blinding.cpp" # to "botan/src/blinding.cpp" # # rename "botan/blinding.h" # to "botan/include/blinding.h" # # rename "botan/botan.h" # to "botan/include/botan.h" # # rename "botan/buf_es.cpp" # to "botan/src/buf_es.cpp" # # rename "botan/buf_es.h" # to "botan/include/buf_es.h" # # rename "botan/buf_filt.cpp" # to "botan/src/buf_filt.cpp" # # rename "botan/buf_filt.h" # to "botan/include/buf_filt.h" # # rename "botan/cbc.cpp" # to "botan/src/cbc.cpp" # # rename "botan/cbc.h" # to "botan/include/cbc.h" # # rename "botan/cbc_mac.cpp" # to "botan/src/cbc_mac.cpp" # # rename "botan/cbc_mac.h" # to "botan/include/cbc_mac.h" # # rename "botan/certstor.cpp" # to "botan/src/certstor.cpp" # # rename "botan/certstor.h" # to "botan/include/certstor.h" # # rename "botan/cfb.cpp" # to "botan/src/cfb.cpp" # # rename "botan/cfb.h" # to "botan/include/cfb.h" # # rename "botan/charset.cpp" # to "botan/src/charset.cpp" # # rename "botan/charset.h" # to "botan/include/charset.h" # # rename "botan/config.cpp" # to "botan/src/config.cpp" # # rename "botan/config.h" # to "botan/include/config.h" # # rename "botan/crc32.cpp" # to "botan/src/crc32.cpp" # # rename "botan/crc32.h" # to "botan/include/crc32.h" # # rename "botan/credits.txt" # to "botan/doc/credits.txt" # # rename "botan/crl_ent.cpp" # to "botan/src/crl_ent.cpp" # # rename "botan/crl_ent.h" # to "botan/include/crl_ent.h" # # rename "botan/ctr.cpp" # to "botan/src/ctr.cpp" # # rename "botan/ctr.h" # to "botan/include/ctr.h" # # rename "botan/cts.cpp" # to "botan/src/cts.cpp" # # rename "botan/cts.h" # to "botan/include/cts.h" # # rename "botan/data_snk.cpp" # to "botan/src/data_snk.cpp" # # rename "botan/data_snk.h" # to "botan/include/data_snk.h" # # rename "botan/data_src.cpp" # to "botan/src/data_src.cpp" # # rename "botan/data_src.h" # to "botan/include/data_src.h" # # rename "botan/datastor.cpp" # to "botan/src/datastor.cpp" # # rename "botan/datastor.h" # to "botan/include/datastor.h" # # rename "botan/def_char.cpp" # to "botan/src/def_char.cpp" # # rename "botan/def_char.h" # to "botan/include/def_char.h" # # rename "botan/def_mode.cpp" # to "botan/src/def_mode.cpp" # # rename "botan/def_ops.cpp" # to "botan/src/def_ops.cpp" # # rename "botan/def_powm.cpp" # to "botan/src/def_powm.cpp" # # rename "botan/def_powm.h" # to "botan/include/def_powm.h" # # rename "botan/defalloc.cpp" # to "botan/src/defalloc.cpp" # # rename "botan/defalloc.h" # to "botan/include/defalloc.h" # # rename "botan/der_enc.cpp" # to "botan/src/der_enc.cpp" # # rename "botan/der_enc.h" # to "botan/include/der_enc.h" # # rename "botan/des.cpp" # to "botan/src/des.cpp" # # rename "botan/des.h" # to "botan/include/des.h" # # rename "botan/dh.cpp" # to "botan/src/dh.cpp" # # rename "botan/dh.h" # to "botan/include/dh.h" # # rename "botan/divide.cpp" # to "botan/src/divide.cpp" # # rename "botan/dl_algo.cpp" # to "botan/src/dl_algo.cpp" # # rename "botan/dl_algo.h" # to "botan/include/dl_algo.h" # # rename "botan/dl_group.cpp" # to "botan/src/dl_group.cpp" # # rename "botan/dl_group.h" # to "botan/include/dl_group.h" # # rename "botan/dlies.cpp" # to "botan/src/dlies.cpp" # # rename "botan/dlies.h" # to "botan/include/dlies.h" # # rename "botan/dsa_gen.cpp" # to "botan/src/dsa_gen.cpp" # # rename "botan/eax.cpp" # to "botan/src/eax.cpp" # # rename "botan/eax.h" # to "botan/include/eax.h" # # rename "botan/ecb.cpp" # to "botan/src/ecb.cpp" # # rename "botan/ecb.h" # to "botan/include/ecb.h" # # rename "botan/eme.h" # to "botan/include/eme.h" # # rename "botan/eme1.cpp" # to "botan/src/eme1.cpp" # # rename "botan/eme_pkcs.cpp" # to "botan/src/eme_pkcs.cpp" # # rename "botan/emsa.h" # to "botan/include/emsa.h" # # rename "botan/emsa1.cpp" # to "botan/src/emsa1.cpp" # # rename "botan/emsa2.cpp" # to "botan/src/emsa2.cpp" # # rename "botan/emsa3.cpp" # to "botan/src/emsa3.cpp" # # rename "botan/emsa4.cpp" # to "botan/src/emsa4.cpp" # # rename "botan/emsa_raw.cpp" # to "botan/src/emsa_raw.cpp" # # rename "botan/eng_base.cpp" # to "botan/src/eng_base.cpp" # # rename "botan/eng_def.h" # to "botan/include/eng_def.h" # # rename "botan/engine.cpp" # to "botan/src/engine.cpp" # # rename "botan/engine.h" # to "botan/include/engine.h" # # rename "botan/enums.h" # to "botan/include/enums.h" # # rename "botan/es_capi.cpp" # to "botan/modules/es_capi/es_capi.cpp" # # rename "botan/es_capi.h" # to "botan/modules/es_capi/es_capi.h" # # rename "botan/es_dev.cpp" # to "botan/modules/es_dev/es_dev.cpp" # # rename "botan/es_dev.h" # to "botan/modules/es_dev/es_dev.h" # # rename "botan/es_egd.cpp" # to "botan/modules/es_egd/es_egd.cpp" # # rename "botan/es_egd.h" # to "botan/modules/es_egd/es_egd.h" # # rename "botan/es_win32.cpp" # to "botan/modules/es_win32/es_win32.cpp" # # rename "botan/es_win32.h" # to "botan/modules/es_win32/es_win32.h" # # rename "botan/exceptn.cpp" # to "botan/src/exceptn.cpp" # # rename "botan/exceptn.h" # to "botan/include/exceptn.h" # # rename "botan/filter.cpp" # to "botan/src/filter.cpp" # # rename "botan/filter.h" # to "botan/include/filter.h" # # rename "botan/filters.cpp" # to "botan/src/filters.cpp" # # rename "botan/filters.h" # to "botan/include/filters.h" # # rename "botan/fips140.cpp" # to "botan/src/fips140.cpp" # # rename "botan/fips140.h" # to "botan/include/fips140.h" # # rename "botan/get_algo.cpp" # to "botan/src/get_algo.cpp" # # rename "botan/get_enc.cpp" # to "botan/src/get_enc.cpp" # # rename "botan/get_pbe.cpp" # to "botan/src/get_pbe.cpp" # # rename "botan/hash_id.cpp" # to "botan/src/hash_id.cpp" # # rename "botan/hash_id.h" # to "botan/include/hash_id.h" # # rename "botan/hex.cpp" # to "botan/src/hex.cpp" # # rename "botan/hex.h" # to "botan/include/hex.h" # # rename "botan/hmac.cpp" # to "botan/src/hmac.cpp" # # rename "botan/hmac.h" # to "botan/include/hmac.h" # # rename "botan/if_algo.cpp" # to "botan/src/if_algo.cpp" # # rename "botan/if_algo.h" # to "botan/include/if_algo.h" # # rename "botan/info.txt" # to "botan/doc/info.txt" # # rename "botan/init.h" # to "botan/include/init.h" # # rename "botan/init_def.cpp" # to "botan/src/init_def.cpp" # # rename "botan/init_opt.cpp" # to "botan/src/init_opt.cpp" # # rename "botan/jacobi.cpp" # to "botan/src/jacobi.cpp" # # rename "botan/kdf.cpp" # to "botan/src/kdf.cpp" # # rename "botan/kdf.h" # to "botan/include/kdf.h" # # rename "botan/keypair.cpp" # to "botan/src/keypair.cpp" # # rename "botan/keypair.h" # to "botan/include/keypair.h" # # rename "botan/libstate.cpp" # to "botan/src/libstate.cpp" # # rename "botan/libstate.h" # to "botan/include/libstate.h" # # rename "botan/license.txt" # to "botan/doc/license.txt" # # rename "botan/loadstor.h" # to "botan/include/loadstor.h" # # rename "botan/look_add.h" # to "botan/include/look_add.h" # # rename "botan/look_pk.cpp" # to "botan/src/look_pk.cpp" # # rename "botan/look_pk.h" # to "botan/include/look_pk.h" # # rename "botan/lookup.h" # to "botan/include/lookup.h" # # rename "botan/make_prm.cpp" # to "botan/src/make_prm.cpp" # # rename "botan/mdx_hash.cpp" # to "botan/src/mdx_hash.cpp" # # rename "botan/mdx_hash.h" # to "botan/include/mdx_hash.h" # # rename "botan/mem_ops.h" # to "botan/include/mem_ops.h" # # rename "botan/mem_pool.cpp" # to "botan/src/mem_pool.cpp" # # rename "botan/mem_pool.h" # to "botan/include/mem_pool.h" # # rename "botan/mgf1.cpp" # to "botan/src/mgf1.cpp" # # rename "botan/mgf1.h" # to "botan/include/mgf1.h" # # rename "botan/mlock.cpp" # to "botan/src/mlock.cpp" # # rename "botan/mode_pad.cpp" # to "botan/src/mode_pad.cpp" # # rename "botan/mode_pad.h" # to "botan/include/mode_pad.h" # # rename "botan/modebase.cpp" # to "botan/src/modebase.cpp" # # rename "botan/modebase.h" # to "botan/include/modebase.h" # # rename "botan/modules.cpp" # to "botan/src/modules.cpp" # # rename "botan/modules.h" # to "botan/include/modules.h" # # rename "botan/mp_asm.cpp" # to "botan/src/mp_asm.cpp" # # rename "botan/mp_asm.h" # to "botan/include/mp_asm.h" # # rename "botan/mp_asmi.h" # to "botan/include/mp_asmi.h" # # rename "botan/mp_comba.cpp" # to "botan/src/mp_comba.cpp" # # rename "botan/mp_core.h" # to "botan/include/mp_core.h" # # rename "botan/mp_misc.cpp" # to "botan/src/mp_misc.cpp" # # rename "botan/mp_mul.cpp" # to "botan/src/mp_mul.cpp" # # rename "botan/mp_mulop.cpp" # to "botan/src/mp_mulop.cpp" # # rename "botan/mp_numth.cpp" # to "botan/src/mp_numth.cpp" # # rename "botan/mp_shift.cpp" # to "botan/src/mp_shift.cpp" # # rename "botan/mp_sqr.cpp" # to "botan/src/mp_sqr.cpp" # # rename "botan/mp_types.h" # to "botan/include/mp_types.h" # # rename "botan/mutex.cpp" # to "botan/src/mutex.cpp" # # rename "botan/mutex.h" # to "botan/include/mutex.h" # # rename "botan/numthry.cpp" # to "botan/src/numthry.cpp" # # rename "botan/numthry.h" # to "botan/include/numthry.h" # # rename "botan/ofb.cpp" # to "botan/src/ofb.cpp" # # rename "botan/ofb.h" # to "botan/include/ofb.h" # # rename "botan/oids.cpp" # to "botan/src/oids.cpp" # # rename "botan/oids.h" # to "botan/include/oids.h" # # rename "botan/out_buf.cpp" # to "botan/src/out_buf.cpp" # # rename "botan/out_buf.h" # to "botan/include/out_buf.h" # # rename "botan/parsing.cpp" # to "botan/src/parsing.cpp" # # rename "botan/parsing.h" # to "botan/include/parsing.h" # # rename "botan/pbe.h" # to "botan/include/pbe.h" # # rename "botan/pbe_pkcs.h" # to "botan/include/pbe_pkcs.h" # # rename "botan/pbes1.cpp" # to "botan/src/pbes1.cpp" # # rename "botan/pbes2.cpp" # to "botan/src/pbes2.cpp" # # rename "botan/pem.cpp" # to "botan/src/pem.cpp" # # rename "botan/pem.h" # to "botan/include/pem.h" # # rename "botan/pipe.cpp" # to "botan/src/pipe.cpp" # # rename "botan/pipe.h" # to "botan/include/pipe.h" # # rename "botan/pipe_io.cpp" # to "botan/src/pipe_io.cpp" # # rename "botan/pipe_rw.cpp" # to "botan/src/pipe_rw.cpp" # # rename "botan/pk_algs.h" # to "botan/include/pk_algs.h" # # rename "botan/pk_core.cpp" # to "botan/src/pk_core.cpp" # # rename "botan/pk_core.h" # to "botan/include/pk_core.h" # # rename "botan/pk_filts.cpp" # to "botan/src/pk_filts.cpp" # # rename "botan/pk_filts.h" # to "botan/include/pk_filts.h" # # rename "botan/pk_keys.cpp" # to "botan/src/pk_keys.cpp" # # rename "botan/pk_keys.h" # to "botan/include/pk_keys.h" # # rename "botan/pk_ops.h" # to "botan/include/pk_ops.h" # # rename "botan/pk_util.cpp" # to "botan/src/pk_util.cpp" # # rename "botan/pk_util.h" # to "botan/include/pk_util.h" # # rename "botan/pkcs10.cpp" # to "botan/src/pkcs10.cpp" # # rename "botan/pkcs10.h" # to "botan/include/pkcs10.h" # # rename "botan/pkcs5.cpp" # to "botan/src/pkcs5.cpp" # # rename "botan/pkcs5.h" # to "botan/include/pkcs5.h" # # rename "botan/pkcs8.cpp" # to "botan/src/pkcs8.cpp" # # rename "botan/pkcs8.h" # to "botan/include/pkcs8.h" # # rename "botan/policy.cpp" # to "botan/src/policy.cpp" # # rename "botan/pow_mod.cpp" # to "botan/src/pow_mod.cpp" # # rename "botan/pow_mod.h" # to "botan/include/pow_mod.h" # # rename "botan/powm_fw.cpp" # to "botan/src/powm_fw.cpp" # # rename "botan/powm_mnt.cpp" # to "botan/src/powm_mnt.cpp" # # rename "botan/prf_x942.cpp" # to "botan/src/prf_x942.cpp" # # rename "botan/pubkey.cpp" # to "botan/src/pubkey.cpp" # # rename "botan/pubkey.h" # to "botan/include/pubkey.h" # # rename "botan/randpool.cpp" # to "botan/src/randpool.cpp" # # rename "botan/randpool.h" # to "botan/include/randpool.h" # # rename "botan/reducer.cpp" # to "botan/src/reducer.cpp" # # rename "botan/reducer.h" # to "botan/include/reducer.h" # # rename "botan/rng.cpp" # to "botan/src/rng.cpp" # # rename "botan/rng.h" # to "botan/include/rng.h" # # rename "botan/rsa.cpp" # to "botan/src/rsa.cpp" # # rename "botan/rsa.h" # to "botan/include/rsa.h" # # rename "botan/s2k.cpp" # to "botan/src/s2k.cpp" # # rename "botan/s2k.h" # to "botan/include/s2k.h" # # rename "botan/secmem.h" # to "botan/include/secmem.h" # # rename "botan/secqueue.cpp" # to "botan/src/secqueue.cpp" # # rename "botan/secqueue.h" # to "botan/include/secqueue.h" # # rename "botan/sha160.cpp" # to "botan/src/sha160.cpp" # # rename "botan/sha160.h" # to "botan/include/sha160.h" # # rename "botan/sha256.cpp" # to "botan/src/sha256.cpp" # # rename "botan/sha256.h" # to "botan/include/sha256.h" # # rename "botan/stl_util.h" # to "botan/include/stl_util.h" # # rename "botan/symkey.cpp" # to "botan/src/symkey.cpp" # # rename "botan/symkey.h" # to "botan/include/symkey.h" # # rename "botan/thanks.txt" # to "botan/doc/thanks.txt" # # rename "botan/timers.cpp" # to "botan/src/timers.cpp" # # rename "botan/timers.h" # to "botan/include/timers.h" # # rename "botan/types.h" # to "botan/include/types.h" # # rename "botan/ui.cpp" # to "botan/src/ui.cpp" # # rename "botan/ui.h" # to "botan/include/ui.h" # # rename "botan/util.cpp" # to "botan/src/util.cpp" # # rename "botan/util.h" # to "botan/include/util.h" # # rename "botan/version.h" # to "botan/include/version.h" # # rename "botan/x509_ca.cpp" # to "botan/src/x509_ca.cpp" # # rename "botan/x509_ca.h" # to "botan/include/x509_ca.h" # # rename "botan/x509_crl.cpp" # to "botan/src/x509_crl.cpp" # # rename "botan/x509_crl.h" # to "botan/include/x509_crl.h" # # rename "botan/x509_ext.cpp" # to "botan/src/x509_ext.cpp" # # rename "botan/x509_ext.h" # to "botan/include/x509_ext.h" # # rename "botan/x509_key.cpp" # to "botan/src/x509_key.cpp" # # rename "botan/x509_key.h" # to "botan/include/x509_key.h" # # rename "botan/x509_obj.cpp" # to "botan/src/x509_obj.cpp" # # rename "botan/x509_obj.h" # to "botan/include/x509_obj.h" # # rename "botan/x509cert.cpp" # to "botan/src/x509cert.cpp" # # rename "botan/x509cert.h" # to "botan/include/x509cert.h" # # rename "botan/x509find.cpp" # to "botan/src/x509find.cpp" # # rename "botan/x509find.h" # to "botan/include/x509find.h" # # rename "botan/x509opt.cpp" # to "botan/src/x509opt.cpp" # # rename "botan/x509self.cpp" # to "botan/src/x509self.cpp" # # rename "botan/x509self.h" # to "botan/include/x509self.h" # # rename "botan/x509stat.cpp" # to "botan/src/x509stat.cpp" # # rename "botan/x509stat.h" # to "botan/include/x509stat.h" # # rename "botan/x509stor.cpp" # to "botan/src/x509stor.cpp" # # rename "botan/x509stor.h" # to "botan/include/x509stor.h" # # rename "botan/x931_rng.cpp" # to "botan/src/x931_rng.cpp" # # rename "botan/x931_rng.h" # to "botan/include/x931_rng.h" # # add_dir "botan/checks" # # add_dir "botan/doc" # # add_dir "botan/include" # # add_dir "botan/misc" # # add_dir "botan/misc/config" # # add_dir "botan/misc/config/arch" # # add_dir "botan/misc/config/cc" # # add_dir "botan/misc/config/makefile" # # add_dir "botan/misc/config/os" # # add_dir "botan/modules" # # add_dir "botan/modules/es_capi" # # add_dir "botan/modules/es_dev" # # add_dir "botan/modules/es_egd" # # add_dir "botan/modules/es_win32" # # add_dir "botan/src" # # add_file "botan/configure.pl" # content [a469a0d9ea98290af2c28bac35550bd5043bf004] # # add_file "botan/misc/config/arch/alpha" # content [3ddceecf33d3c312c6e88ff806473f0a3312d8af] # # add_file "botan/misc/config/arch/amd64" # content [ea841b88c03ac99e1d6f4b266e9edd08297c7ef1] # # add_file "botan/misc/config/arch/arm" # content [5b5ba555184e32c595f377bbaa90cdc02bf3118d] # # add_file "botan/misc/config/arch/hppa" # content [f25ef1e8568842c172a05057dfd986051b7c8a7e] # # add_file "botan/misc/config/arch/ia32" # content [37777964e179c7f27e0ce9f2d58284dabe5cfadf] # # add_file "botan/misc/config/arch/ia64" # content [a0c99937fa7372ef669e38ad7bc4b491e19f2504] # # add_file "botan/misc/config/arch/m68k" # content [be33fc2ff7c50f19005bd27abcb35630913998e6] # # add_file "botan/misc/config/arch/mips32" # content [29e5434c7780f673b13abbfa201be8de016c6d96] # # add_file "botan/misc/config/arch/mips64" # content [2017114eb41595fc67bd99e656ed693b8203452f] # # add_file "botan/misc/config/arch/ppc" # content [54a4538daebdb62bbf94ebc68739e2340053546a] # # add_file "botan/misc/config/arch/ppc64" # content [126d245d29863c6f1683232536070357b55a3261] # # add_file "botan/misc/config/arch/s390" # content [3396bb518e62257cb86414fb69a60a957a2bb803] # # add_file "botan/misc/config/arch/s390x" # content [d2293d45e3f5ba1db4b314bed6ff6027b42bd7a7] # # add_file "botan/misc/config/arch/sh" # content [575846d7a1152b27ac60dc87a9a8740ac1a3b9ad] # # add_file "botan/misc/config/arch/sparc32" # content [39f7a595d67765bacc938ca37a31a961f83804f6] # # add_file "botan/misc/config/arch/sparc64" # content [688995d212ed33ee2c91a93335383fcb11e5e47c] # # add_file "botan/misc/config/botan-config.in" # content [68f5c985b3e1ecea11ccf5d97d034e370dbea95f] # # add_file "botan/misc/config/buildh.in" # content [6b00fa619a18dcf0cc5873b52ef03e645b893b83] # # add_file "botan/misc/config/cc/bcc" # content [561513b32f972726cc0e9a83213e33debef2f95f] # # add_file "botan/misc/config/cc/compaq" # content [5b855b2566a3778a208de0f3950299bf71c60b08] # # add_file "botan/misc/config/cc/ekopath" # content [5e065967f6749183e09a69826d804c12c67ce362] # # add_file "botan/misc/config/cc/gcc" # content [43c899114aa18a78b168514dae4fd3ed2912655c] # # add_file "botan/misc/config/cc/hpcc" # content [fe395425b4097070162a67b827d43ecfb392287e] # # add_file "botan/misc/config/cc/icc" # content [7f8af2a729b9a249412a5f392b68708d760e15cf] # # add_file "botan/misc/config/cc/kai" # content [61a0afad96346a53d75843a0e3c775e263365885] # # add_file "botan/misc/config/cc/mipspro" # content [83a382a4c5c89c79124aaa5fea9543b9934a61e9] # # add_file "botan/misc/config/cc/msvc" # content [f0fcdde68fcd833622fcb77df697118fd84bf3ff] # # add_file "botan/misc/config/cc/pgi" # content [35dc70b946b7aa83deb8bf26560fa8ca40680c6e] # # add_file "botan/misc/config/cc/sgipro64" # content [564ca86eb93141bee356b540e38aff20570ee977] # # add_file "botan/misc/config/cc/sunwspro" # content [bdb44bb25abc0086d1c78c0b2efed958e614f8b6] # # add_file "botan/misc/config/makefile/nmake.in" # content [5982ee9b1c9e97433a1a1dbf14efa412585cf490] # # add_file "botan/misc/config/makefile/unix.in" # content [ee7062ad81b0ecd648a13a863a0876bbccdaee45] # # add_file "botan/misc/config/makefile/unix_shr.in" # content [ae60f52d0264845e124e1686b9d0ee0cd94e6d4d] # # add_file "botan/misc/config/os/aix" # content [1ae489a4423d56d58cdfa6a2c3ec5c52a8e044f4] # # add_file "botan/misc/config/os/beos" # content [1bb820a522401f7aaa56bead761b6e6c29fa9626] # # add_file "botan/misc/config/os/cygwin" # content [da74ebac5f9ddd009c73255200998cb25295e830] # # add_file "botan/misc/config/os/darwin" # content [955f562d8e542ac0e6a4cef84cd7560603fcd33c] # # add_file "botan/misc/config/os/defaults" # content [afae15ccadd0aff96811073ccef511d586b48474] # # add_file "botan/misc/config/os/freebsd" # content [d7d4d7710c19332222b65f041853c5fb10617259] # # add_file "botan/misc/config/os/hpux" # content [3259c76e44c088eb2c46c104e4628fde63841e8f] # # add_file "botan/misc/config/os/irix" # content [cc8d00e11363d56828dd5b1084ff3af9e9bb76fd] # # add_file "botan/misc/config/os/linux" # content [566c9d6827c1ea19baabb82d547a6231d18fca45] # # add_file "botan/misc/config/os/netbsd" # content [c09645e6aab081667e61307d0536b0adc15186b9] # # add_file "botan/misc/config/os/openbsd" # content [d1cf34508f82296b77ac1c05a2b8e4ec0e9ef8f7] # # add_file "botan/misc/config/os/qnx" # content [7a8fa58bccdf45e7aacadf9c48ba2c21c75af46e] # # add_file "botan/misc/config/os/solaris" # content [42ccff72aea7d428a33b639eda96e613cc4c33ea] # # add_file "botan/misc/config/os/tru64" # content [c9f88ca6171640c19f649b8ce5f0b5a44c6f2a02] # # add_file "botan/misc/config/os/windows" # content [e36531bad64840b7551ca36b03f8063fa24155ff] # # add_file "botan/modules/es_capi/modinfo.txt" # content [30e09336bd70f66edfc3953f72f0cae2e2d50991] # # add_file "botan/modules/es_dev/modinfo.txt" # content [8fbe774458a9a8b1699bef59ebaab7bb89c75c06] # # add_file "botan/modules/es_egd/modinfo.txt" # content [11617d320ffae85830cfc628f3cd34be3a4d7b0a] # # add_file "botan/modules/es_win32/modinfo.txt" # content [e04adc51c45928e40c22e2a9f696386a22aa0f17] # # patch "Makefile.am" # from [867f5d72609048dcedd2982a6dccff7958dadc75] # to [9dc6dc47bb6ffd8bb30fdea3cfb93af57fb8bc11] # # patch "configure.ac" # from [3f76f442e8f46ee313fd76c33e4640e9e642a64b] # to [412a36fa2ba992a81bc17f9ba0a64fe3fdc6ff46] # # patch "monotone/Makefile.am" # from [fd5e00f0f45818168ced8b1872548141a2e57668] # to [6734ef8f2516168902519ec3c770f96bf06745d2] # # set "botan/configure.pl" # attr "mtn:execute" # value "true" # ============================================================ --- botan/configure.pl a469a0d9ea98290af2c28bac35550bd5043bf004 +++ botan/configure.pl a469a0d9ea98290af2c28bac35550bd5043bf004 @@ -0,0 +1,1895 @@ +#!/usr/bin/perl -w + +require 5.006; + +use strict; +use Getopt::Long; +use File::Spec; +use File::Copy; + +my $MAJOR_VERSION = 1; +my $MINOR_VERSION = 7; +my $PATCH_VERSION = 4; + +my $VERSION_STRING = "$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION"; + +################################################## +# Data # +################################################## +my (%CPU, %OPERATING_SYSTEM, %COMPILER, %MODULES); + +my @DOCS = ( + 'api.pdf', 'tutorial.pdf', 'fips140.pdf', + 'api.tex', 'tutorial.tex', 'fips140.tex', + 'credits.txt', 'info.txt', 'license.txt', 'log.txt', + 'thanks.txt', 'todo.txt', 'pgpkeys.asc'); + +my $TRACING = 0; + +################################################## +# Run main() and Quit # +################################################## +my $config = {}; + +main(); +exit; + +################################################## +# Main Driver # +################################################## +sub main { + my $base_dir = where_am_i(); + + $$config{'base-dir'} = $base_dir; + $$config{'config-dir'} = File::Spec->catdir($base_dir, 'misc', 'config'); + $$config{'mods-dir'} = File::Spec->catdir($base_dir, 'modules'); + $$config{'src-dir'} = File::Spec->catdir($base_dir, 'src'); + $$config{'include-dir'} = File::Spec->catdir($base_dir, 'include'); + $$config{'checks-dir'} = File::Spec->catdir($base_dir, 'checks'); + $$config{'doc-dir'} = File::Spec->catdir($base_dir, 'doc'); + + %CPU = read_info_files($config, 'arch', \&get_arch_info); + %OPERATING_SYSTEM = read_info_files($config, 'os', \&get_os_info); + %COMPILER = read_info_files($config, 'cc', \&get_cc_info); + %MODULES = read_module_files($config); + + add_to($config, { + 'version_major' => $MAJOR_VERSION, + 'version_minor' => $MINOR_VERSION, + 'version_patch' => $PATCH_VERSION, + 'version' => $VERSION_STRING, + }); + + get_options($config); + + my $default_value_is = sub { + my ($var, $val) = @_; + $$config{$var} = $val if not defined($$config{$var}); + }; + + &$default_value_is('gcc_bug', 0); + &$default_value_is('autoconfig', 1); + &$default_value_is('debug', 0); + &$default_value_is('shared', 'yes'); + &$default_value_is('local_config', ''); + + if(defined($$config{'build-dir'})) { + $$config{'botan-config'} = + File::Spec->catfile($$config{'build-dir'}, 'botan-config'); + $$config{'makefile'} = + File::Spec->catfile($$config{'build-dir'}, 'Makefile'); + $$config{'check_prefix'} = $$config{'build-dir'}; + $$config{'lib_prefix'} = $$config{'build-dir'}; + } + else { # defaults + $$config{'build-dir'} = 'build'; + $$config{'botan-config'} = 'botan-config'; + $$config{'makefile'} = 'Makefile'; + $$config{'check_prefix'} = ''; + $$config{'lib_prefix'} = ''; + } + + choose_target($config); + + my $os = $$config{'os'}; + my $cc = $$config{'compiler'}; + + &$default_value_is('prefix', os_info_for($os, 'install_root')); + &$default_value_is('libdir', os_info_for($os, 'lib_dir')); + &$default_value_is('docdir', os_info_for($os, 'doc_dir')); + &$default_value_is('make_style', $COMPILER{$cc}{'makefile_style'}); + + autoload_modules($config) if($$config{'autoconfig'}); + + add_to($config, { + 'includedir' => os_info_for($os, 'header_dir'), + + 'build_lib' => File::Spec->catdir($$config{'build-dir'}, 'lib'), + 'build_check' => File::Spec->catdir($$config{'build-dir'}, 'checks'), + 'build_include' => + File::Spec->catdir($$config{'build-dir'}, 'include'), + 'build_include_botan' => + File::Spec->catdir($$config{'build-dir'}, 'include', 'botan'), + + 'mp_bits' => find_mp_bits(sort keys %{$$config{'modules'}}), + 'mod_libs' => [ using_libs($os, sort keys %{$$config{'modules'}}) ], + + 'sources' => { + map_to($$config{'src-dir'}, dir_list($$config{'src-dir'})) + }, + + 'includes' => { + map_to($$config{'include-dir'}, dir_list($$config{'include-dir'})) + }, + + 'check_src' => { + map_to($$config{'checks-dir'}, + grep { $_ ne 'keys' and address@hidden(dat|h)$@ } + dir_list($$config{'checks-dir'})) + } + }); + + load_modules($config); + + my @dirs = mkdirs($$config{'build-dir'}, + $$config{'build_include'}, $$config{'build_include_botan'}, + $$config{'build_lib'}, $$config{'build_check'}); + + #autoconfig('Created ' . join(' ', @dirs)) if @dirs; + + write_pkg_config($config); + + process_template(File::Spec->catfile($$config{'config-dir'}, 'buildh.in'), + File::Spec->catfile($$config{'build-dir'}, 'build.h'), + $config); + $$config{'includes'}{'build.h'} = $$config{'build-dir'}; + + copy_include_files($config); + + generate_makefile($config); +} + +sub where_am_i { + my ($volume,$dir,$file) = File::Spec->splitpath($0); + my $src_dir = File::Spec->catpath($volume, $dir, ''); + return $src_dir if $src_dir; + return File::Spec->curdir(); +} + +################################################## +# Diagnostics # +################################################## +sub with_diagnostic { + my ($type, @args) = @_; + + my $args = join('', @args); + my $str = "($type): "; + while(length($str) < 14) { $str = ' ' . $str; } + + $str .= $args . "\n"; + return $str; +} + +sub croak { + die with_diagnostic('error', @_); +} + +sub warning { + warn with_diagnostic('warning', @_); +} + +sub autoconfig { + print with_diagnostic('autoconfig', @_) + if($$config{'verbose'}); +} + +sub emit_help { + print join('', @_); + exit; +} + +sub trace { + return unless $TRACING; + + my (undef, undef, $line) = caller(0); + my (undef, undef, undef, $func) = caller(1); + + $func =~ s/main:://; + + warn with_diagnostic('trace', "at $func:$line - ", @_); +} + +################################################## +# Display Help and Quit # +################################################## +sub display_help { + sub module_sets { + my %modsets; + for my $name (sort keys %MODULES) { + my %info = %{$MODULES{$name}}; + next unless (defined($info{'modset'})); + + for my $s (split(/,/, $info{'modset'})) { + $modsets{$s} = undef; + } + } + + return sort keys %modsets; + } + + my $sets = join(' ', module_sets()); + + my $listing = sub { + my (@list) = @_; + + return '' if (@list == 0); + + my ($output, $len) = ('', 0); + + my $append = sub { + my ($to_append) = @_; + $output .= $to_append; + $len += length $to_append; + }; + + foreach my $name (sort @list) { + next if $name eq 'defaults'; + if($len > 65) { + $output .= "\n "; + $len = 8; + } + &$append($name . ' '); + } + chop $output; + return $output; + }; + + my $modules = &$listing(keys %MODULES); + my $compilers = &$listing(keys %COMPILER); + my $oses = &$listing(keys %OPERATING_SYSTEM); + my $cpus = &$listing(keys %CPU); + + my $helptxt = <&1`; + + $gcc_version = '' if not defined $gcc_version; + + my $has_ll_bug = 0; + $has_ll_bug = 1 if($gcc_version =~ /4\.[0123]/); + $has_ll_bug = 1 if($gcc_version =~ /3\.[34]/); + $has_ll_bug = 1 if($gcc_version =~ /2\.25\.[0-4]/); + $has_ll_bug = 1 if($gcc_version eq ''); + + $has_ll_bug = 0 if($arch eq 'alpha' or $arch =~ /.*64$/); + + if($has_ll_bug) + { + warning('Enabling -fpermissive to work around ', + 'possible GCC bug'); + + $$config{'gcc_bug'} = 1; + } + + warning('GCC 2.95.x issues many spurious warnings') + if($gcc_version =~ /2\.95\.[0-4]/); + } + } + + trace("using $cc $os $arch $submodel"); + + add_to($config, { + 'compiler' => $cc, + 'os' => $os, + 'arch' => $arch, + 'submodel' => $submodel, + }); +} + +# Add modules that we think would work (unless autoconfig is off) +# to $$config{'modules'} +sub autoload_modules { + my ($config) = @_; + + my $cc = $$config{'compiler'}; + my $os = $$config{'os'}; + my $arch = $$config{'arch'}; + my $submodel = $$config{'submodel'}; + + my $asm_ok = $$config{'asm_ok'}; + + foreach my $mod (sort keys %MODULES) { + my %modinfo = %{ $MODULES{$mod} }; + + if(defined($$config{'modules'}{$mod})) { + autoconfig("Module $mod - loading by user request"); + next; + } + + my @arch_list = @{ $modinfo{'arch'} }; + if(scalar @arch_list > 0 && + !in_array($arch, address@hidden) && + !in_array($submodel, address@hidden)) { + autoconfig("Module $mod - won't use, " . + "doesn't run on CPU $arch/$submodel"); + next; + } + + my @os_list = @{ $modinfo{'os'} }; + if(scalar @os_list > 0 && !in_array($os, address@hidden)) { + autoconfig("Module $mod - won't use, not compatible with OS $os"); + next; + } + + my @cc_list = @{ $modinfo{'cc'} }; + if(scalar @cc_list > 0 && !in_array($cc, address@hidden)) { + autoconfig("Module $mod - won't use, not compatbile with CC $cc"); + next; + } + + if(!$asm_ok and $modinfo{'load_on'} eq 'asm_ok') { + autoconfig("Module $mod - won't use; avoiding due to use of --no-asm"); + next; + } + + if($modinfo{'load_on'} eq 'request') { + autoconfig("Module $mod - won't use, loaded by request only"); + next; + } + + autoconfig("Module $mod - autoloading"); + $$config{'modules'}{$mod} = 1; + } +} + +sub get_options { + my ($config) = @_; + + my $save_option = sub { + my ($opt, $val) = @_; + $opt =~ s/-/_/g; + $$config{$opt} = $val; + }; + + $$config{'verbose'} = 1; + $$config{'asm_ok'} = 1; + $$config{'modules'} = {}; + + sub arch_info { + my $arg = $_[0]; + + my $arch = find_arch($arg); + + unless(defined($arch) and defined($CPU{$arch})) { + warning("Unknown arch name '$arg' passed to --arch-info (try --help)"); + return ''; + } + + my %info = %{ $CPU{$arch} }; + + my $out = "Information for $arg ($arch)\n--------\n"; + + if(@{$info{'aliases'}}) { + $out .= 'Aliases: ' . join(' ', @{$info{'aliases'}}) . "\n"; + } + + if(@{$info{'submodels'}}) { + $out .= 'Submodels: ' . join(' ', @{$info{'submodels'}}) . "\n"; + } + + foreach my $k (keys %{$info{'submodel_aliases'}}) { + $out .= "Alias '$k' -> '" . $info{'submodel_aliases'}{$k} . "'\n"; + } + + if(defined($info{'endian'})) { + $out .= 'Default endian: ' . $info{'endian'} . "\n"; + } + + if(defined($info{'unaligned'})) { + $out .= 'Unaligned memory access: ' . $info{'unaligned'} . "\n"; + } + + return $out; + } + + sub add_modules { + my ($config,$mods) = @_; + + foreach my $mod (split(/,/, $mods)) { + $$config{'modules'}{$mod} = 1; + } + } + + sub add_module_sets { + my ($config,$sets) = @_; + + foreach my $set (split(/,/, $sets)) { + for my $name (sort keys %MODULES) { + my %info = %{$MODULES{$name}}; + + next unless (defined($info{'modset'})); + + for my $s (split(/,/, $info{'modset'})) { + if($s eq $set) { + $$config{'modules'}{$name} = 1; + } + } + } + } + } + + exit 1 unless GetOptions( + 'help' => sub { display_help(); }, + 'module-info' => sub { emit_help(module_info()); }, + 'version' => sub { emit_help("Botan $VERSION_STRING\n") }, + + 'quiet' => sub { $$config{'verbose'} = 0; }, + + 'cc=s' => sub { &$save_option('compiler', $_[1]) }, + 'os=s' => sub { &$save_option(@_) }, + 'cpu=s' => sub { &$save_option(@_) }, + 'endian=s' => sub { &$save_option(@_); }, + 'unaligned-mem=s' => sub { &$save_option(@_); }, + + 'arch-info=s' => sub { emit_help(arch_info($_[1])); }, + + 'prefix=s' => sub { &$save_option(@_); }, + 'docdir=s' => sub { &$save_option(@_); }, + 'libdir=s' => sub { &$save_option(@_); }, + 'build-dir=s' => sub { $$config{'build-dir'} = $_[1]; }, + 'local-config=s' => + sub { &$save_option('local_config', slurp_file($_[1])); }, + + 'make-style=s' => sub { &$save_option(@_); }, + + 'module=s' => sub { add_modules($config, $_[1]); }, + 'modules=s' => sub { add_modules($config, $_[1]); }, + 'module-set=s' => sub { add_module_sets($config, $_[1]); }, + 'module-sets=s' => sub { add_module_sets($config, $_[1]); }, + + 'trace' => sub { $TRACING = 1; }, + 'debug' => sub { &$save_option($_[0], 1); }, + 'no-shared' => sub { $$config{'shared'} = 'no'; }, + 'no-asm' => sub { $$config{'asm_ok'} = 0; }, + + 'noauto' => sub { $$config{'autoconfig'} = 0; }, + 'dumb-gcc|gcc295x' => sub { $$config{'gcc_bug'} = 1; } + ); + + # All arguments should now be consumed + croak("Unknown option $ARGV[0] (try --help)") unless($#ARGV == -1); +} + +################################################## +# Functions to search the info tables # +################################################## +sub find_arch { + my $name = $_[0]; + + foreach my $arch (keys %CPU) { + my %info = %{$CPU{$arch}}; + + return $arch if($name eq $arch); + + foreach my $alias (@{$info{'aliases'}}) { + return $arch if($name eq $alias); + } + + foreach my $submodel (@{$info{'submodels'}}) { + return $arch if($name eq $submodel); + } + + foreach my $submodel (keys %{$info{'submodel_aliases'}}) { + return $arch if($name eq $submodel); + } + } + return undef; +}; + +sub figure_out_arch { + my ($name) = @_; + + return ('generic', 'generic') if($name eq 'generic'); + + my $submodel_alias = sub { + my ($name,$info) = @_; + + my %info = %{$info}; + + foreach my $submodel (@{$info{'submodels'}}) { + return $submodel if($name eq $submodel); + } + + return '' unless defined $info{'submodel_aliases'}; + my %sm_aliases = %{$info{'submodel_aliases'}}; + + foreach my $alias (keys %sm_aliases) { + my $official = $sm_aliases{$alias}; + return $official if($alias eq $name); + } + return ''; + }; + + my $arch = find_arch($name); + croak("Arch type $name isn't known (try --help)") unless defined $arch; + trace("mapped name '$name' to arch '$arch'"); + + my %archinfo = %{ $CPU{$arch} }; + + my $submodel = &$submodel_alias($name, \%archinfo); + + if($submodel eq '') { + $submodel = $archinfo{'default_submodel'}; + + autoconfig("Using $submodel as default type for family ", realname($arch)) + if($submodel ne $arch); + } + + trace("mapped name '$name' to submodel '$submodel'"); + + croak("Couldn't figure out arch type of $name") + unless defined($arch) and defined($submodel); + + return ($arch,$submodel); +} + +sub os_alias { + my $name = $_[0]; + + foreach my $os (keys %OPERATING_SYSTEM) { + foreach my $alias (@{$OPERATING_SYSTEM{$os}{'aliases'}}) { + if($alias eq $name) { + trace("os_alias($name) -> $os"); + return $os; + } + } + } + + return $name; +} + +sub os_info_for { + my ($os,$what) = @_; + + die unless defined($os); + + croak('os_info_for called with an os of defaults (internal problem)') + if($os eq 'defaults'); + + my $result = ''; + + if(defined($OPERATING_SYSTEM{$os})) { + my %osinfo = %{$OPERATING_SYSTEM{$os}}; + $result = $osinfo{$what}; + } + + if(!defined($result) or $result eq '') { + $result = $OPERATING_SYSTEM{'defaults'}{$what}; + } + + croak("os_info_for: No info for $what on $os") unless defined $result; + + return $result; +} + +sub my_compiler { + my ($config) = @_; + my $cc = $$config{'compiler'}; + + croak('my_compiler called, but no compiler set in config') + unless defined $cc and $cc ne ''; + + croak("unknown compiler $cc") unless defined $COMPILER{$cc}; + + return %{$COMPILER{$cc}}; +} + +sub mach_opt { + my ($config) = @_; + + my %ccinfo = my_compiler($config); + + # Nothing we can do in that case + return '' unless $ccinfo{'mach_opt_flags'}; + + my $submodel = $$config{'submodel'}; + my $arch = $$config{'arch'}; + if(defined($ccinfo{'mach_opt_flags'}{$submodel})) + { + return $ccinfo{'mach_opt_flags'}{$submodel}; + } + elsif(defined($ccinfo{'mach_opt_flags'}{$arch})) { + my $mach_opt_flags = $ccinfo{'mach_opt_flags'}{$arch}; + my $processed_modelname = $submodel; + + my $remove = ''; + if(defined($ccinfo{'mach_opt_re'}) and + defined($ccinfo{'mach_opt_re'}{$arch})) { + $remove = $ccinfo{'mach_opt_re'}{$arch}; + } + + $processed_modelname =~ s/$remove//; + $mach_opt_flags =~ s/SUBMODEL/$processed_modelname/g; + return $mach_opt_flags; + } + return ''; +} + +################################################## +# # +################################################## +sub using_libs { + my ($os,@using) = @_; + my %libs; + + foreach my $mod (@using) { + my %MOD_LIBS = %{ $MODULES{$mod}{'libs'} }; + foreach my $mod_os (keys %MOD_LIBS) { + next if($mod_os =~ /^all!$os$/); + next if($mod_os =~ /^all!$os,/); + next if($mod_os =~ /^all!.*,${os}$/); + next if($mod_os =~ /^all!.*,$os,.*/); + next unless($mod_os eq $os or ($mod_os =~ /^all.*/)); + my @liblist = split(/,/, $MOD_LIBS{$mod_os}); + foreach my $lib (@liblist) { $libs{$lib} = 1; } + } + } + + return sort keys %libs; + } + +sub libs { + my ($prefix,$suffix,@libs) = @_; + my $output = ''; + foreach my $lib (@libs) { + $output .= ' ' if($output ne ''); + $output .= $prefix . $lib . $suffix; + } + return $output; +} + +################################################## +# Path and file manipulation utilities # +################################################## +sub portable_symlink { + my ($from, $to_dir, $to_fname) = @_; + + my $can_symlink = 0; + my $can_link = 0; + + unless($^O eq 'MSWin32' or $^O eq 'dos' or $^O eq 'cygwin') { + $can_symlink = eval { symlink("",""); 1 }; + $can_link = eval { link("",""); 1 }; + } + + chdir $to_dir or croak("Can't chdir to $to_dir ($!)"); + + if($can_symlink) { + symlink $from, $to_fname or + croak("Can't symlink $from to $to_fname ($!)"); + } + elsif($can_link) { + link $from, $to_fname or + croak("Can't link $from to $to_fname ($!)"); + } + else { + copy ($from, $to_fname) or + croak("Can't copy $from to $to_fname ($!)"); + } + + my $go_up = File::Spec->splitdir($to_dir); + for(my $j = 0; $j != $go_up; $j++) # return to where we were + { + chdir File::Spec->updir(); + } +} + +sub copy_include_files { + my ($config) = @_; + + my $include_dir = $$config{'build_include_botan'}; + + trace('Copying to ', $include_dir); + + foreach my $file (dir_list($include_dir)) { + my $path = File::Spec->catfile($include_dir, $file); + unlink $path or croak("Could not unlink $path ($!)"); + } + + my $link_up = sub { + my ($dir, $file) = @_; + my $updir = File::Spec->updir(); + portable_symlink(File::Spec->catfile($updir, $updir, $updir, + $dir, $file), + $include_dir, $file); + }; + + my $files = $$config{'includes'}; + + foreach my $file (keys %$files) { + &$link_up($$files{$file}, $file); + } +} + +sub dir_list { + my ($dir) = @_; + opendir(DIR, $dir) or croak("Couldn't read directory '$dir' ($!)"); + + my @listing = grep { $_ ne File::Spec->curdir() and + $_ ne File::Spec->updir() } readdir DIR; + + closedir DIR; + return @listing; +} + +sub mkdirs { + my (@dirs) = @_; + + my @created; + foreach my $dir (@dirs) { + next if( -e $dir and -d $dir ); # skip it if it's already there + mkdir($dir, 0777) or + croak("Could not create directory $dir ($!)"); + push @created, $dir; + } + return @created; +} + +sub slurp_file { + my $file = $_[0]; + + return '' if(!defined($file) or $file eq ''); + + croak("'$file': No such file") unless(-e $file); + croak("'$file': Not a regular file") unless(-f $file); + + open FILE, "<$file" or croak("Couldn't read $file ($!)"); + + my $output = ''; + while() { $output .= $_; } + close FILE; + + return $output; +} + +sub which +{ + my $file = $_[0]; + my @paths = split(/:/, $ENV{PATH}); + foreach my $path (@paths) + { + my $file_path = File::Spec->catfile($path, $file); + return $file_path if(-e $file_path and -r $file_path); + } + return ''; +} + +# Return a hash mapping every var in a list to a constant value +sub map_to { + my $var = shift; + return map { $_ => $var } @_; +} + +sub in_array { + my($target, $array) = @_; + return 0 unless defined($array); + foreach (@$array) { return 1 if($_ eq $target); } + return 0; +} + +sub add_to { + my ($to,$from) = @_; + + foreach my $key (keys %$from) { + $$to{$key} = $$from{$key}; + } +} + +################################################## +# # +################################################## +sub find_mp_bits { + my(@modules_list) = @_; + my $mp_bits = 32; # default, good for most systems + + my $seen_mp_module = undef; + + foreach my $modname (@modules_list) { + my %modinfo = %{ $MODULES{$modname} }; + if($modinfo{'mp_bits'}) { + if(defined($seen_mp_module) and $modinfo{'mp_bits'} != $mp_bits) { + croak('Inconsistent mp_bits requests from modules ', + $seen_mp_module, ' and ', $modname); + } + + $seen_mp_module = $modname; + $mp_bits = $modinfo{'mp_bits'}; + } + } + return $mp_bits; +} + +################################################## +# # +################################################## +sub realname { + my $arg = $_[0]; + + return $COMPILER{$arg}{'realname'} + if defined $COMPILER{$arg}; + + return $OPERATING_SYSTEM{$arg}{'realname'} + if defined $OPERATING_SYSTEM{$arg}; + + return $CPU{$arg}{'realname'} + if defined $CPU{$arg}; + + return $arg; +} + +################################################## +# # +################################################## +sub load_modules { + my ($config) = @_; + + foreach my $mod (sort keys %{$$config{'modules'}}) { + load_module($config, $mod); + } + + my $gen_defines = sub { + my $defines = ''; + + my $arch = $$config{'arch'}; + + if($arch ne 'generic') { + my %cpu_info = %{$CPU{$arch}}; + my $endian = $cpu_info{'endian'}; + + if(defined($$config{'endian'})) { + $endian = $$config{'endian'}; + $endian = undef unless($endian eq 'little' || $endian eq 'big'); + } + elsif(defined($endian)) { + autoconfig("Since arch is $arch, assuming $endian endian mode"); + } + + $defines .= "#define BOTAN_TARGET_ARCH_IS_" . (uc $arch) . "\n"; + + my $submodel = $$config{'submodel'}; + if($arch ne $submodel) { + $submodel = uc $submodel; + $submodel =~ s/-/_/g; + $defines .= "#define BOTAN_TARGET_CPU_IS_$submodel\n"; + } + + my $unaligned_ok = 0; + + if(defined($endian)) { + $endian = uc $endian; + $defines .= "#define BOTAN_TARGET_CPU_IS_${endian}_ENDIAN\n"; + + if(defined($$config{'unaligned_mem'})) { + my $spec = $$config{'unaligned_mem'}; + + if($spec eq 'yes') { + $unaligned_ok = 1; + } + elsif($spec eq 'no') { + $unaligned_ok = 0; + } + else { + warning("Unknown arg to --unaligned-mem '$spec', will ignore"); + $unaligned_ok = 0; + } + } + elsif(defined($cpu_info{'unaligned'}) and + $cpu_info{'unaligned'} eq 'ok') + { + autoconfig("Since arch is $arch, " . + "assuming unaligned memory access is OK"); + $unaligned_ok = 1; + } + } + + $defines .= + "#define BOTAN_TARGET_UNALIGNED_LOADSTOR_OK $unaligned_ok\n"; + } + + my @defarray; + foreach my $mod (sort keys %{$$config{'modules'}}) { + my $defs = $MODULES{$mod}{'define'}; + next unless $defs; + + push @defarray, split(/,/, $defs); + } + + $defines .= "\n" if(@defarray); + + foreach (sort @defarray) { + die unless(defined $_ and $_ ne ''); + $defines .= "#define BOTAN_EXT_$_\n"; + } + chomp($defines); + return $defines; + }; + + $$config{'defines'} = &$gen_defines(); +} + +sub load_module { + my ($config, $modname) = @_; + + my %module = %{$MODULES{$modname}}; + + my $works_on = sub { + my ($what, $lst_ref) = @_; + my @lst = @{$lst_ref}; + return 1 if not @lst; # empty list -> no restrictions + return 1 if $what eq 'generic'; # trust the user + return in_array($what, address@hidden); + }; + + # Check to see if everything is OK WRT system requirements + my $os = $$config{'os'}; + + croak("Module '$modname' does not run on $os") + unless(&$works_on($os, $module{'os'})); + + my $arch = $$config{'arch'}; + my $sub = $$config{'submodel'}; + + croak("Module '$modname' does not run on $arch/$sub") + unless(&$works_on($arch, $module{'arch'}) or + &$works_on($sub, $module{'arch'})); + + my $cc = $$config{'compiler'}; + + croak("Module '$modname' does not work with $cc") + unless(&$works_on($cc, $module{'cc'})); + + my $handle_files = sub { + my($lst, $func) = @_; + return unless defined($lst); + + foreach (sort @$lst) { + &$func($modname, $config, $_); + } + }; + + &$handle_files($module{'ignore'}, \&ignore_file); + &$handle_files($module{'add'}, \&add_file); + &$handle_files($module{'replace'}, + sub { ignore_file(@_); add_file(@_); }); + + warning($modname, ': ', $module{'note'}) + if(defined($module{'note'})); +} + +################################################## +# # +################################################## +sub file_type { + my ($config, $file) = @_; + + return ('sources', $$config{'src-dir'}) + if($file =~ /\.cpp$/ or $file =~ /\.c$/ or $file =~ /\.S$/); + return ('includes', $$config{'include-dir'}) + if($file =~ /\.h$/); + + croak('file_type() - don\'t know what sort of file ', $file, ' is'); +} + +sub add_file { + my ($modname, $config, $file) = @_; + + check_for_file($config, $file, $modname, $modname); + + my $mod_dir = File::Spec->catdir($$config{'mods-dir'}, $modname); + + my $do_add_file = sub { + my ($type) = @_; + + croak("File $file already added from ", $$config{$type}{$file}) + if(defined($$config{$type}{$file})); + + $$config{$type}{$file} = $mod_dir; + }; + + &$do_add_file(file_type($config, $file)); +} + +sub ignore_file { + my ($modname, $config, $file) = @_; + check_for_file($config, $file, undef, $modname); + + my $do_ignore_file = sub { + my ($type, $ok_if_from) = @_; + + if(defined ($$config{$type}{$file})) { + + croak("$modname - File $file modified from ", + $$config{$type}{$file}) + if($$config{$type}{$file} ne $ok_if_from); + + delete $$config{$type}{$file}; + } + }; + + &$do_ignore_file(file_type($config, $file)); +} + +sub check_for_file { + my ($config, $file, $added_from, $modname) = @_; + + my $full_path = sub { + my ($file,$modname) = @_; + + return File::Spec->catfile($$config{'mods-dir'}, $modname, $file) + if(defined($modname)); + + my @typeinfo = file_type($config, $file); + return File::Spec->catfile($typeinfo[1], $file); + }; + + $file = &$full_path($file, $added_from); + + croak("Module $modname requires that file $file exist. This error\n ", + 'should never occur; please contact the maintainers with details.') + unless(-e $file); +} + +################################################## +# # +################################################## +sub process_template { + my ($in, $out, $config) = @_; + + trace("$in -> $out"); + + my $contents = slurp_file($in); + + foreach my $name (keys %$config) { + my $val = $$config{$name}; + + croak("Undefined variable $name in $in") unless defined $val; + + $contents =~ s/@\{var:$name\}/$val/g; + + unless($val eq 'no' or $val eq 'false') { + $contents =~ s/address@hidden:$name (.*)\}/$1/g; + $contents =~ s/address@hidden:$name (.*) (.*)\}/$1/g; + } else { + $contents =~ s/address@hidden:$name (.*)\}//g; + $contents =~ s/address@hidden:$name (.*) (.*)\}/$2/g; + } + } + + if($contents =~ /@\{var:([a-z_]*)\}/ or + $contents =~ /@\{if:(.*) /) { + croak("Unbound variable '$1' in $in"); + } + + open OUT, ">$out" or croak("Couldn't write $out ($!)"); + print OUT $contents; + close OUT; +} + +################################################## +# # +################################################## +sub read_list { + my ($line, $reader, $marker, $func) = @_; + + if($line =~ address@hidden<$marker>$@) { + while(1) { + $line = &$reader(); + last if($line =~ address@hidden$@); + &$func($line); + } + } +} + +sub list_push { + my ($listref) = @_; + return sub { push @$listref, $_[0]; } +} + +sub match_any_of { + my ($line, $hash, $quoted, $any_of) = @_; + + $quoted = ($quoted eq 'quoted') ? 1 : 0; + + my @match_these = split(/:/, $any_of); + + foreach my $what (split(/:/, $any_of)) { + $$hash{$what} = $1 if(not $quoted and $line =~ /^$what (.*)/); + $$hash{$what} = $1 if($quoted and $line =~ /^$what \"(.*)\"/); + } +} + +################################################## +# # +################################################## +sub make_reader { + my $filename = $_[0]; + + croak("make_reader(): Arg was undef") if not defined $filename; + + open FILE, "<$filename" or + croak("Couldn't read $filename ($!)"); + + return sub { + my $line = ''; + while(1) { + my $line = ; + last unless defined($line); + + chomp($line); + $line =~ s/#.*//; + $line =~ s/^\s*//; + $line =~ s/\s*$//; + $line =~ s/\s\s*/ /; + $line =~ s/\t/ /; + return $line if $line ne ''; + } + close FILE; + return undef; + } +} + +################################################## +# # +################################################## +sub read_info_files { + my ($config, $dir, $func) = @_; + + $dir = File::Spec->catdir($$config{'config-dir'}, $dir); + + my %allinfo; + foreach my $file (dir_list($dir)) { + my $fullpath = File::Spec->catfile($dir, $file); + + trace("reading $fullpath"); + %{$allinfo{$file}} = &$func($file, $fullpath); + } + + return %allinfo; +} + +sub read_module_files { + my ($config) = @_; + + my $mod_dir = $$config{'mods-dir'}; + + my %allinfo; + foreach my $dir (dir_list($mod_dir)) { + my $modfile = File::Spec->catfile($mod_dir, $dir, 'modinfo.txt'); + + trace("reading $modfile"); + %{$allinfo{$dir}} = get_module_info($dir, $modfile); + } + + return %allinfo; +} + +################################################## +# # +################################################## + +sub get_module_info { + my ($name, $file) = @_; + my $reader = make_reader($file); + + my %info; + $info{'name'} = $name; + $info{'load_on'} = 'request'; # default unless specified + $info{'libs'} = {}; + + while($_ = &$reader()) { + match_any_of($_, \%info, 'quoted', 'realname:note'); + match_any_of($_, \%info, 'unquoted', 'define:mp_bits:modset:load_on'); + + read_list($_, $reader, 'arch', list_push(address@hidden'arch'}})); + read_list($_, $reader, 'cc', list_push(address@hidden'cc'}})); + read_list($_, $reader, 'os', list_push(address@hidden'os'}})); + read_list($_, $reader, 'add', list_push(address@hidden'add'}})); + read_list($_, $reader, 'replace', list_push(address@hidden'replace'}})); + read_list($_, $reader, 'ignore', list_push(address@hidden'ignore'}})); + + read_list($_, $reader, 'libs', + sub { + my $line = $_[0]; + $line =~ m/^([\w!,]*) -> ([\w,-]*)$/; + $info{'libs'}{$1} = $2; + }); + + if(/^require_version /) { + if(/^require_version (\d+)\.(\d+)\.(\d+)$/) { + my $version = "$1.$2.$3"; + my $needed_version = 100*$1 + 10*$2 + $3; + + my $have_version = + 100*$MAJOR_VERSION + 10*$MINOR_VERSION + $PATCH_VERSION; + + if($needed_version > $have_version) { + warning("Module $name needs v$version; disabling"); + return (); + } + } + else { + croak("In module $name, bad version requirement '$_'"); + } + } + } + + return %info; +} + +################################################## +# # +################################################## +sub get_arch_info { + my ($name,$file) = @_; + my $reader = make_reader($file); + + my %info; + $info{'name'} = $name; + + while($_ = &$reader()) { + match_any_of($_, \%info, 'quoted', 'realname'); + match_any_of($_, \%info, 'unquoted', + 'default_submodel:endian:unaligned'); + + read_list($_, $reader, 'aliases', list_push(address@hidden'aliases'}})); + read_list($_, $reader, 'submodels', list_push(address@hidden'submodels'}})); + + read_list($_, $reader, 'submodel_aliases', + sub { + my $line = $_[0]; + $line =~ m/^(\S*) -> (\S*)$/; + $info{'submodel_aliases'}{$1} = $2; + }); + } + return %info; +} + +################################################## +# # +################################################## +sub get_os_info { + my ($name,$file) = @_; + my $reader = make_reader($file); + + my %info; + $info{'name'} = $name; + + while($_ = &$reader()) { + match_any_of($_, \%info, 'quoted', 'realname:ar_command'); + + match_any_of($_, \%info, 'unquoted', + 'os_type:obj_suffix:so_suffix:static_suffix:' . + 'install_root:header_dir:lib_dir:doc_dir:' . + 'install_user:install_group:ar_needs_ranlib:' . + 'install_cmd_data:install_cmd_exec'); + + read_list($_, $reader, 'aliases', list_push(address@hidden'aliases'}})); + + read_list($_, $reader, 'supports_shared', + list_push(address@hidden'supports_shared'}})); + } + return %info; +} + +################################################## +# # +################################################## +sub get_cc_info { + my ($name,$file) = @_; + my $reader = make_reader($file); + + my %info; + $info{'name'} = $name; + + while($_ = &$reader()) { + match_any_of($_, \%info, 'quoted', + 'realname:binary_name:' . + 'compile_option:output_to_option:add_include_dir_option:' . + 'add_lib_dir_option:add_lib_option:' . + 'lib_opt_flags:check_opt_flags:' . + 'lang_flags:warning_flags:so_obj_flags:ar_command:' . + 'debug_flags:no_debug_flags'); + + match_any_of($_, \%info, 'unquoted', 'makefile_style'); + + sub quoted_mapping { + my $hashref = $_[0]; + return sub { + my $line = $_[0]; + $line =~ m/^(\S*) -> \"(.*)\"$/; + $$hashref{$1} = $2; + } + } + + read_list($_, $reader, 'mach_abi_linking', + quoted_mapping(\%{$info{'mach_abi_linking'}})); + read_list($_, $reader, 'so_link_flags', + quoted_mapping(\%{$info{'so_link_flags'}})); + + read_list($_, $reader, 'mach_opt', + sub { + my $line = $_[0]; + $line =~ m/^(\S*) -> \"(.*)\" ?(.*)?$/; + $info{'mach_opt_flags'}{$1} = $2; + $info{'mach_opt_re'}{$1} = $3; + }); + + } + return %info; +} + +################################################## +# # +################################################## +sub write_pkg_config { + my ($config) = @_; + + return if($$config{'os'} eq 'generic' or + $$config{'os'} eq 'windows'); + + $$config{'link_to'} = libs('-l', '', 'm', @{$$config{'mod_libs'}}); + + my $botan_config = $$config{'botan-config'}; + + process_template( + File::Spec->catfile($$config{'config-dir'}, 'botan-config.in'), + $botan_config, $config); + chmod 0755, $botan_config; + + delete $$config{'link_to'}; +} + +################################################## +# # +################################################## +sub file_list { + my ($put_in, $from, $to, %files) = @_; + my $spaces = 16; + + my $list = ''; + + my $len = $spaces; + foreach (sort keys %files) { + my $file = $_; + + if($len > 60) { + $list .= "\\\n" . ' 'x$spaces; + $len = $spaces; + } + + $file =~ s/$from/$to/ if(defined($from) and defined($to)); + + my $dir = $files{$_}; + $dir = $put_in if defined $put_in; + + if(defined($dir)) { + $list .= File::Spec->catfile ($dir, $file) . ' '; + $len += length($file) + length($dir); + } + else { + $list .= $file . ' '; + $len += length($file); + } + } + + return $list; +} + +sub build_cmds { + my ($config, $dir, $flags, $files) = @_; + + my $output = ''; + + my $obj_suffix = $$config{'obj_suffix'}; + + my %ccinfo = my_compiler($config); + + my $inc = $ccinfo{'add_include_dir_option'}; + my $from = $ccinfo{'compile_option'}; + my $to = $ccinfo{'output_to_option'}; + + my $inc_dir = $$config{'build_include'}; + + # Probably replace by defaults to -I -c -o + croak('undef value found in build_cmds') + unless defined($inc) and defined($from) and defined($to); + + my $bld_line = "\t\$(CXX) $inc$inc_dir $flags $from\$? $to\$@"; + + foreach (sort keys %$files) { + my $src_file = File::Spec->catfile($$files{$_}, $_); + my $obj_file = File::Spec->catfile($dir, $_); + + $obj_file =~ s/\.cpp$/.$obj_suffix/; + $obj_file =~ s/\.c$/.$obj_suffix/; + $obj_file =~ s/\.S$/.$obj_suffix/; + + $output .= "$obj_file: $src_file\n$bld_line\n\n"; + } + chomp($output); + chomp($output); + return $output; +} + +sub generate_makefile { + my ($config) = @_; + + trace('entering'); + + sub os_ar_command { + return os_info_for(shift, 'ar_command'); + } + + sub append_if { + my($var,$addme,$cond) = @_; + + croak('append_if: reference was undef') unless defined $var; + + if($cond and $addme ne '') { + $$var .= ' ' unless($$var eq '' or $$var =~ / $/); + $$var .= $addme; + } + } + + sub append_ifdef { + my($var,$addme) = @_; + append_if($var, $addme, defined($addme)); + } + + my $empty_if_nil = sub { + my $val = $_[0]; + return $val if defined($val); + return ''; + }; + + my %ccinfo = my_compiler($config); + + my $lang_flags = ''; + append_ifdef(\$lang_flags, $ccinfo{'lang_flags'}); + append_if(\$lang_flags, "-fpermissive", $$config{'gcc_bug'}); + + my $debug = $$config{'debug'}; + + my $lib_opt_flags = ''; + append_ifdef(\$lib_opt_flags, $ccinfo{'lib_opt_flags'}); + append_ifdef(\$lib_opt_flags, $ccinfo{'debug_flags'}) if($debug); + append_ifdef(\$lib_opt_flags, $ccinfo{'no_debug_flags'}) if(!$debug); + + # This is a default that works on most Unix and Unix-like systems + my $ar_command = 'ar crs'; + my $ranlib_command = 'true'; # almost no systems need it anymore + + # See if there are any over-riding methods. We presume if CC is creating + # the static libs, it knows how to create the index itself. + + my $os = $$config{'os'}; + + if($ccinfo{'ar_command'}) { + $ar_command = $ccinfo{'ar_command'}; + } + elsif(os_ar_command($os)) + { + $ar_command = os_ar_command($os); + $ranlib_command = 'ranlib' + if(os_info_for($os, 'ar_needs_ranlib') eq 'yes'); + } + + my $arch = $$config{'arch'}; + + my $abi_opts = ''; + append_ifdef(\$abi_opts, $ccinfo{'mach_abi_linking'}{$arch}); + append_ifdef(\$abi_opts, $ccinfo{'mach_abi_linking'}{$os}); + append_ifdef(\$abi_opts, $ccinfo{'mach_abi_linking'}{'all'}); + $abi_opts = ' ' . $abi_opts if($abi_opts ne ''); + + if($$config{'shared'} eq 'yes' and + (in_array('all', $OPERATING_SYSTEM{$os}{'supports_shared'}) or + in_array($arch, $OPERATING_SYSTEM{$os}{'supports_shared'}))) { + + $$config{'so_obj_flags'} = &$empty_if_nil($ccinfo{'so_obj_flags'}); + $$config{'so_link'} = &$empty_if_nil($ccinfo{'so_link_flags'}{$os}); + + if($$config{'so_link'} eq '') { + $$config{'so_link'} = + &$empty_if_nil($ccinfo{'so_link_flags'}{'default'}) + } + + if($$config{'so_obj_flags'} eq '' and $$config{'so_link'} eq '') { + $$config{'shared'} = 'no'; + + warning($$config{'compiler'}, ' has no shared object flags set ', + "for $os; disabling shared"); + } + } + else { + $$config{'shared'} = 'no'; + $$config{'so_obj_flags'} = ''; + $$config{'so_link'} = ''; + } + + add_to($config, { + 'cc' => $ccinfo{'binary_name'} . $abi_opts, + 'lib_opt' => $lib_opt_flags, + 'check_opt' => &$empty_if_nil($ccinfo{'check_opt_flags'}), + 'mach_opt' => mach_opt($config), + 'lang_flags' => $lang_flags, + 'warn_flags' => &$empty_if_nil($ccinfo{'warning_flags'}), + + 'ar_command' => $ar_command, + 'ranlib_command' => $ranlib_command, + 'static_suffix' => os_info_for($os, 'static_suffix'), + 'so_suffix' => os_info_for($os, 'so_suffix'), + 'obj_suffix' => os_info_for($os, 'obj_suffix'), + + 'install_cmd_exec' => os_info_for($os, 'install_cmd_exec'), + 'install_cmd_data' => os_info_for($os, 'install_cmd_data'), + 'install_user' => os_info_for($os, 'install_user'), + 'install_group' => os_info_for($os, 'install_group'), + }); + + my $is_in_doc_dir = + sub { -e File::Spec->catfile($$config{'doc-dir'}, $_[0]) }; + + my $docs = file_list(undef, undef, undef, + map_to($$config{'doc-dir'}, + grep { &$is_in_doc_dir($_); } @DOCS)); + + $docs .= File::Spec->catfile($$config{'base-dir'}, 'readme.txt'); + + my $includes = file_list(undef, undef, undef, + map_to($$config{'build_include_botan'}, + keys %{$$config{'includes'}})); + + my $lib_objs = file_list($$config{'build_lib'}, '(\.cpp$|\.c$|\.S$)', + '.' . $$config{'obj_suffix'}, + %{$$config{'sources'}}); + + my $check_objs = file_list($$config{'build_check'}, '.cpp', + '.' . $$config{'obj_suffix'}, + %{$$config{'check_src'}}), + + my $lib_build_cmds = build_cmds($config, $$config{'build_lib'}, + '$(LIB_FLAGS)', $$config{'sources'}); + + my $check_build_cmds = build_cmds($config, $$config{'build_check'}, + '$(CHECK_FLAGS)', $$config{'check_src'}); + + add_to($config, { + 'lib_objs' => $lib_objs, + 'check_objs' => $check_objs, + 'lib_build_cmds' => $lib_build_cmds, + 'check_build_cmds' => $check_build_cmds, + + 'doc_files' => $docs, + 'include_files' => $includes + }); + + my $template_dir = File::Spec->catdir($$config{'config-dir'}, 'makefile'); + my $template = undef; + + my $make_style = $$config{'make_style'}; + + if($make_style eq 'unix') { + $template = File::Spec->catfile($template_dir, 'unix.in'); + + $template = File::Spec->catfile($template_dir, 'unix_shr.in') + if($$config{'shared'} eq 'yes'); + + $$config{'install_cmd_exec'} =~ s/(OWNER|GROUP)/\$($1)/g; + $$config{'install_cmd_data'} =~ s/(OWNER|GROUP)/\$($1)/g; + + add_to($config, { + 'link_to' => libs('-l', '', 'm', @{$$config{'mod_libs'}}), + }); + } + elsif($make_style eq 'nmake') { + $template = File::Spec->catfile($template_dir, 'nmake.in'); + + add_to($config, { + 'shared' => 'no', + 'link_to' => libs('', '.'.$$config{'static_suffix'}, + @{$$config{'mod_libs'}}), + }); + } + + croak("Don't know about makefile format '$make_style'") + unless defined $template; + + trace("'$make_style' -> '$template'"); + + process_template($template, $$config{'makefile'}, $config); + + #autoconfig('Created ' . $$config{'makefile'}); +} + +################################################## +# Configuration Guessing # +################################################## +sub guess_cpu_from_this +{ + my $cpuinfo = lc $_[0]; + my $cpu = ''; + + $cpu = 'athlon' if($cpuinfo =~ /athlon/); + $cpu = 'pentium4' if($cpuinfo =~ /pentium 4/); + $cpu = 'pentium4' if($cpuinfo =~ /pentium\(r\) 4/); + $cpu = 'pentium3' if($cpuinfo =~ /pentium iii/); + $cpu = 'pentium2' if($cpuinfo =~ /pentium ii/); + $cpu = 'pentium3' if($cpuinfo =~ /pentium 3/); + $cpu = 'pentium2' if($cpuinfo =~ /pentium 2/); + + $cpu = 'core2duo' if($cpuinfo =~ /intel\(r\) core\(tm\)2/); + + $cpu = 'athlon64' if($cpuinfo =~ /athlon64/); + $cpu = 'athlon64' if($cpuinfo =~ /athlon\(tm\) 64/); + $cpu = 'opteron' if($cpuinfo =~ /opteron/); + + # The 32-bit SPARC stuff is impossible to match to arch type easily, and + # anyway the uname stuff will pick up that it's a SPARC so it doesn't + # matter. If it's an Ultra, assume a 32-bit userspace, no 64-bit code + # possible; that's the most common setup right now anyway + $cpu = 'sparc32-v9' if($cpuinfo =~ /ultrasparc/); + + # 64-bit PowerPC + $cpu = 'rs64a' if($cpuinfo =~ /rs64-/); + $cpu = 'power3' if($cpuinfo =~ /power3/); + $cpu = 'power4' if($cpuinfo =~ /power4/); + $cpu = 'power5' if($cpuinfo =~ /power5/); + $cpu = 'ppc970' if($cpuinfo =~ /ppc970/); + + # Ooh, an Alpha. Try to figure out what kind + if($cpuinfo =~ /alpha/) + { + $cpu = 'alpha-ev4' if($cpuinfo =~ /ev4/); + $cpu = 'alpha-ev5' if($cpuinfo =~ /ev5/); + $cpu = 'alpha-ev56' if($cpuinfo =~ /ev56/); + $cpu = 'alpha-pca56' if($cpuinfo =~ /pca56/); + $cpu = 'alpha-ev6' if($cpuinfo =~ /ev6/); + $cpu = 'alpha-ev67' if($cpuinfo =~ /ev67/); + $cpu = 'alpha-ev68' if($cpuinfo =~ /ev68/); + $cpu = 'alpha-ev7' if($cpuinfo =~ /ev7/); + } + + trace('guessing ', $cpu) if($cpu); + return $cpu; +} + +# Do some WAGing and see if we can figure out what system we are. Think about +# this as a really moronic config.guess +sub guess_compiler +{ + my @CCS = ('gcc', 'msvc', 'icc', 'compaq', 'kai'); + + # First try the CC enviornmental variable, if it's set + if(defined($ENV{CC})) + { + my @new_CCS = ($ENV{CC}); + foreach my $cc (@CCS) { push @new_CCS, $cc; } + @CCS = @new_CCS; + } + + foreach (@CCS) + { + my $bin_name = $COMPILER{$_}{'binary_name'}; + autoconfig("Guessing you want to use $_ as the compiler"); + return $_ if(which($bin_name) ne ''); + } + + croak( + "Can't find a usable C++ compiler, is your PATH right?\n" . + "You might need to run with explicit compiler/system flags;\n" . + " run '$0 --help' for more information\n"); +} + +sub guess_os +{ + sub recognize_os + { + my $os = os_alias($_[0]); + if(defined($OPERATING_SYSTEM{$os})) { + autoconfig("Guessing your operating system is $os"); + return $os; + } + return undef; + } + + my $guess = recognize_os($^O); + return $guess if $guess; + + trace("Can't guess os from $^O"); + + my $uname = `uname -s 2>/dev/null`; + chomp $uname; + $uname = lc $uname; + + $guess = recognize_os($uname); + return $guess if $guess; + + trace("Can't guess os from $uname"); + + warning("Unknown OS ('$^O', '$uname'), falling back to generic code"); + return 'generic'; +} + +sub guess_cpu +{ + # If we have /proc/cpuinfo, try to get nice specific information about + # what kind of CPU we're running on. + my $cpuinfo = '/proc/cpuinfo'; + + if(-e $cpuinfo and -r $cpuinfo) + { + my $cpu = guess_cpu_from_this(slurp_file($cpuinfo)); + if($cpu) { + autoconfig("Guessing (based on $cpuinfo) that your CPU is a $cpu"); + return $cpu; + } + } + + # `umame -p` is sometimes something stupid like unknown, but in some + # cases it can be more specific (useful) than `uname -m` + my $uname_p = `uname -p 2>/dev/null`; + chomp $uname_p; + my $cpu = guess_cpu_from_this($uname_p); + + # If guess_cpu_from_this didn't figure it out, try it as is + if($cpu eq '') { $cpu = lc $uname_p; } + + sub known_arch { + my ($name) = @_; + + foreach my $arch (keys %CPU) { + my %info = %{$CPU{$arch}}; + + return 1 if $name eq $info{'name'}; + foreach my $submodel (@{$info{'submodels'}}) { + return 1 if $name eq $submodel; + } + + foreach my $alias (@{$info{'aliases'}}) { + return 1 if $name eq $alias; + } + + if(defined($info{'submodel_aliases'})) { + my %submodel_aliases = %{$info{'submodel_aliases'}}; + foreach my $sm_alias (keys %submodel_aliases) { + return 1 if $name eq $sm_alias; + } + } + } + return 0; + } + + if(!known_arch($cpu)) + { + # Nope, couldn't figure out uname -p + $cpu = lc `uname -m 2>/dev/null`; + chomp $cpu; + + if(!known_arch($cpu)) + { + $cpu = 'generic'; + } + } + + autoconfig("Guessing (based on uname -p) your CPU is a $cpu"); + return $cpu; +} ============================================================ --- botan/misc/config/arch/alpha 3ddceecf33d3c312c6e88ff806473f0a3312d8af +++ botan/misc/config/arch/alpha 3ddceecf33d3c312c6e88ff806473f0a3312d8af @@ -0,0 +1,31 @@ +realname "DEC Alpha" + +default_submodel alpha-ev5 +endian little + + +axp +alphaaxp + + + +alpha-ev4 +alpha-ev5 +alpha-ev56 +alpha-pca56 +alpha-ev6 +alpha-ev67 +alpha-ev68 +alpha-ev7 + + + +alphaev4 -> alpha-ev4 +alphaev5 -> alpha-ev5 +alphaev56 -> alpha-ev56 +alphapca56 -> alpha-pca56 +alphaev6 -> alpha-ev6 +alphaev67 -> alpha-ev67 +alphaev68 -> alpha-ev68 +alphaev7 -> alpha-ev7 + ============================================================ --- botan/misc/config/arch/amd64 ea841b88c03ac99e1d6f4b266e9edd08297c7ef1 +++ botan/misc/config/arch/amd64 ea841b88c03ac99e1d6f4b266e9edd08297c7ef1 @@ -0,0 +1,26 @@ +realname "AMD64" + +default_submodel amd64 + +endian little +unaligned ok + + +x86-64 +x86_64 # for RPM + + + +opteron +em64t +core2duo + + + +core -> core2duo +core2 -> core2duo +intelcore2 -> core2duo +intelcore2duo -> core2duo +athlon64 -> opteron +k8 -> opteron + ============================================================ --- botan/misc/config/arch/arm 5b5ba555184e32c595f377bbaa90cdc02bf3118d +++ botan/misc/config/arch/arm 5b5ba555184e32c595f377bbaa90cdc02bf3118d @@ -0,0 +1,22 @@ +realname "ARM" + +default_submodel arm2 + + +arm2 +arm3 +arm6 +arm7 +arm8 +arm9 +strongarm +strongarm110 +strongarm1100 +xscale + + + +sa110 -> strongarm110 +sa1100 -> strongarm1100 +strongarm1110 -> strongarm1100 + ============================================================ --- botan/misc/config/arch/hppa f25ef1e8568842c172a05057dfd986051b7c8a7e +++ botan/misc/config/arch/hppa f25ef1e8568842c172a05057dfd986051b7c8a7e @@ -0,0 +1,17 @@ +realname "HP-PA" + +default_submodel hppa1.1 + + +hp-pa +parisc +pa-risc +hp-parisc +hp-pa-risc + + + +hppa1.0 +hppa1.1 +hppa2.0 + ============================================================ --- botan/misc/config/arch/ia32 37777964e179c7f27e0ce9f2d58284dabe5cfadf +++ botan/misc/config/arch/ia32 37777964e179c7f27e0ce9f2d58284dabe5cfadf @@ -0,0 +1,39 @@ +realname "IA-32" + +default_submodel i686 + +endian little +unaligned ok + + +x86 +ix86 +80x86 +i86pc # for Solaris + + + +i386 +i486 +i586 +i686 +pentium4 +k6 +athlon + + + +pentium -> i586 +pentiumpro -> i686 +pentium_pro -> i686 +pentium2 -> i686 +pentium3 -> i686 + +duron -> athlon +athlon-xp -> athlon +k7 -> athlon + +p2 -> i686 +p3 -> i686 +p4 -> pentium4 + ============================================================ --- botan/misc/config/arch/ia64 a0c99937fa7372ef669e38ad7bc4b491e19f2504 +++ botan/misc/config/arch/ia64 a0c99937fa7372ef669e38ad7bc4b491e19f2504 @@ -0,0 +1,14 @@ +realname "IA-64" + +default_submodel itanium1 + + +merced +itanium + + + +itanium1 +itanium2 +mckinley + ============================================================ --- botan/misc/config/arch/m68k be33fc2ff7c50f19005bd27abcb35630913998e6 +++ botan/misc/config/arch/m68k be33fc2ff7c50f19005bd27abcb35630913998e6 @@ -0,0 +1,15 @@ +realname "Motorola 680x0" + +default_submodel 68040 + + +680x0 +68k + + + +68020 +68030 +68040 +68060 + ============================================================ --- botan/misc/config/arch/mips32 29e5434c7780f673b13abbfa201be8de016c6d96 +++ botan/misc/config/arch/mips32 29e5434c7780f673b13abbfa201be8de016c6d96 @@ -0,0 +1,23 @@ +realname "MIPS" + +default_submodel r3000 + + +mips + + + +mip32-r3000 +mip32-r6000 + + + +r3k -> mips32-r3000 +r6k -> mips32-r6000 + +r3000 -> mips32-r3000 +r6000 -> mips32-r6000 + +mipsbe -> mips3000 # For RPM +mipsle -> mips3000 # For RPM + ============================================================ --- botan/misc/config/arch/mips64 2017114eb41595fc67bd99e656ed693b8203452f +++ botan/misc/config/arch/mips64 2017114eb41595fc67bd99e656ed693b8203452f @@ -0,0 +1,32 @@ +realname "MIPS64" + +default_submodel r4400 + + +mips64-r4000 +mips64-r4100 +mips64-r4300 +mips64-r4400 +mips64-r4600 +mips64-r4560 +mips64-r5000 +mips64-r8000 +mips64-r10000 + + + +r4k -> mips64-r4000 +r5k -> mips64-r5000 +r8k -> mips64-r8000 +r10k -> mips64-r10000 + +r4000 -> mips64-r4000 +r4100 -> mips64-r4100 +r4300 -> mips64-r4300 +r4400 -> mips64-r4400 +r4600 -> mips64-r4600 +r4560 -> mips64-r4560 +r5000 -> mips64-r5000 +r8000 -> mips64-r8000 +r10000 -> mips64-r10000 + ============================================================ --- botan/misc/config/arch/ppc 54a4538daebdb62bbf94ebc68739e2340053546a +++ botan/misc/config/arch/ppc 54a4538daebdb62bbf94ebc68739e2340053546a @@ -0,0 +1,25 @@ +realname "PowerPC" + +endian big + +# G3; probably a reasonable assumption these days +default_submodel ppc740 + + +powerpc + + + +g3 -> ppc740 +g4 -> ppc7450 + + + +ppc601 +ppc603 +ppc604 +ppc740 +ppc750 +ppc7400 +ppc7450 + ============================================================ --- botan/misc/config/arch/ppc64 126d245d29863c6f1683232536070357b55a3261 +++ botan/misc/config/arch/ppc64 126d245d29863c6f1683232536070357b55a3261 @@ -0,0 +1,17 @@ +realname "PowerPC 64" + +endian big + +default_submodel power4 + + +g5 -> ppc970 + + + +rs64a +ppc970 +power3 +power4 +power5 + ============================================================ --- botan/misc/config/arch/s390 3396bb518e62257cb86414fb69a60a957a2bb803 +++ botan/misc/config/arch/s390 3396bb518e62257cb86414fb69a60a957a2bb803 @@ -0,0 +1,7 @@ +realname "S/390 31-bit" + +default_submodel s390 + + +s390 + ============================================================ --- botan/misc/config/arch/s390x d2293d45e3f5ba1db4b314bed6ff6027b42bd7a7 +++ botan/misc/config/arch/s390x d2293d45e3f5ba1db4b314bed6ff6027b42bd7a7 @@ -0,0 +1,7 @@ +realname "S/390 64-bit" + +default_submodel s390x + + +s390x + ============================================================ --- botan/misc/config/arch/sh 575846d7a1152b27ac60dc87a9a8740ac1a3b9ad +++ botan/misc/config/arch/sh 575846d7a1152b27ac60dc87a9a8740ac1a3b9ad @@ -0,0 +1,11 @@ +realname "Hitachi SH" + +default_submodel sh1 + + +sh1 +sh2 +sh3 +sh3e +sh4 + ============================================================ --- botan/misc/config/arch/sparc32 39f7a595d67765bacc938ca37a31a961f83804f6 +++ botan/misc/config/arch/sparc32 39f7a595d67765bacc938ca37a31a961f83804f6 @@ -0,0 +1,34 @@ +realname "SPARC" + +# V7 doesn't have integer multiply, so it will be bitterly slow for some things +# (especially BigInt). Also, it's fairly rare nowadays, so we default to V8. +default_submodel sparc32-v8 + +endian big + + +sparc + + + +sparc32-v7 +sparc32-v8 +sparc32-v9 + + + +cypress -> sparc32-v7 +supersparc -> sparc32-v8 +hypersparc -> sparc32-v8 +microsparc -> sparc32-v8 +sparclite -> sparc32-v8 + +sparcv7 -> sparc32-v7 +sparcv8 -> sparc32-v8 +sparcv9 -> sparc32-v9 + +sparc-v7 -> sparc32-v7 +sparc-v8 -> sparc32-v8 +sparc-v9 -> sparc32-v9 + + ============================================================ --- botan/misc/config/arch/sparc64 688995d212ed33ee2c91a93335383fcb11e5e47c +++ botan/misc/config/arch/sparc64 688995d212ed33ee2c91a93335383fcb11e5e47c @@ -0,0 +1,15 @@ +realname "SPARC64" + +default_submodel sparc64-ultra + + +sparc64-ultra +sparc64-ultra2 +sparc64-ultra3 + + + +ultrasparc -> sparc64-ultra +ultrasparc2 -> sparc64-ultra2 +ultrasparc3 -> sparc64-ultra3 + ============================================================ --- botan/misc/config/botan-config.in 68f5c985b3e1ecea11ccf5d97d034e370dbea95f +++ botan/misc/config/botan-config.in 68f5c985b3e1ecea11ccf5d97d034e370dbea95f @@ -0,0 +1,57 @@ +#!/bin/sh + +guess_prefix=`dirname \`dirname $0\`` address@hidden:prefix} +prefix= address@hidden:includedir} address@hidden:libdir} + +usage() +{ + echo "botan-config [--prefix[=DIR]] [--version] [--libs] [--cflags]" + exit 1 +} + +if test $# -eq 0; then + usage +fi + +if test `echo $guess_prefix | cut -c 1` = "/"; then + prefix=$guess_prefix +else + prefix=$install_prefix +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + case "$1" in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo $prefix + ;; + --version) + echo @{var:version} + exit 0 + ;; + --cflags) + if [ $prefix != "/usr" -a $prefix != "/usr/local" ] + then + echo -I$prefix/$includedir + fi + ;; + --libs) + echo -L$prefix/$libdir @{var:link_to} -lbotan + ;; + *) + usage + ;; + esac + shift +done + +exit 0 ============================================================ --- botan/misc/config/buildh.in 6b00fa619a18dcf0cc5873b52ef03e645b893b83 +++ botan/misc/config/buildh.in 6b00fa619a18dcf0cc5873b52ef03e645b893b83 @@ -0,0 +1,21 @@ +/************************************************* +* Build Configuration Header File * +* (C) 1999-2007 The Botan Project * +*************************************************/ + +#ifndef BOTAN_BUILD_CONFIG_H__ +#define BOTAN_BUILD_CONFIG_H__ + +#define BOTAN_VERSION_MAJOR @{var:version_major} +#define BOTAN_VERSION_MINOR @{var:version_minor} +#define BOTAN_VERSION_PATCH @{var:version_patch} + +#define BOTAN_MP_WORD_BITS @{var:mp_bits} +#define BOTAN_DEFAULT_BUFFER_SIZE 4096 + +#define BOTAN_KARAT_MUL_THRESHOLD 12 +#define BOTAN_KARAT_SQR_THRESHOLD 12 + address@hidden:defines} address@hidden:local_config} +#endif ============================================================ --- botan/misc/config/cc/bcc 561513b32f972726cc0e9a83213e33debef2f95f +++ botan/misc/config/cc/bcc 561513b32f972726cc0e9a83213e33debef2f95f @@ -0,0 +1,28 @@ +realname "Borland C++" + +binary_name "bcc32" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O2" +check_opt_flags "-O2" +debug_flags "" +no_debug_flags "" +lang_flags "-tWR -tWM -tWC +warning_flags "-w" + +ar_command "tlib /C /P256" + +makefile_style nmake + + +i486 -> "/G4" +i586 -> "/G5" +i686 -> "/G6" +athlon -> "/G6" +pentium4 -> "/G6" + ============================================================ --- botan/misc/config/cc/compaq 5b855b2566a3778a208de0f3950299bf71c60b08 +++ botan/misc/config/cc/compaq 5b855b2566a3778a208de0f3950299bf71c60b08 @@ -0,0 +1,26 @@ +realname "Compaq C++" + +binary_name "cxx" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +# -O3 and up seem to be unhappy with Botan +lib_opt_flags "-O2" +check_opt_flags "-O2" +debug_flags "-g" +no_debug_flags "" +lang_flags "-std ansi -D__USE_STD_IOSTREAM" + +makefile_style unix + + +default -> "$(CXX) -shared -soname $(SONAME)" + + + +alpha -> "-arch=SUBMODEL" alpha- + ============================================================ --- botan/misc/config/cc/ekopath 5e065967f6749183e09a69826d804c12c67ce362 +++ botan/misc/config/cc/ekopath 5e065967f6749183e09a69826d804c12c67ce362 @@ -0,0 +1,37 @@ +realname "PathScale EKOPath C++" + +binary_name "pathCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:Ofast:alias=disjoint" +check_opt_flags "-O2" +lang_flags "-D_REENTRANT -ansi -Wno-long-long" +warning_flags "-W -Wall" + +ar_command "pathCC -ar -o" + +so_obj_flags "-fPIC" +debug_flags "-g" + +makefile_style unix + + +default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" + + + +athlon -> "-mcpu=athlon" +pentium4 -> "-mcpu=pentium4" + +opteron -> "-mcpu=opteron" +em64t -> "-mcpu=em64t" +core2duo -> "-mcpu=core" + +ia32 -> "-mcpu=anyx86" +amd64 -> "-mcpu=athlon64" + ============================================================ --- botan/misc/config/cc/gcc 43c899114aa18a78b168514dae4fd3ed2912655c +++ botan/misc/config/cc/gcc 43c899114aa18a78b168514dae4fd3ed2912655c @@ -0,0 +1,83 @@ +realname "GNU C++" + +binary_name "g++" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O2 -finline-functions" +check_opt_flags "-O2" +lang_flags "-D_REENTRANT -ansi -Wno-long-long" +warning_flags "-W -Wall" + +so_obj_flags "-fPIC" +debug_flags "-g" + +makefile_style unix + + +# The default works for GNU ld and several other Unix linkers +default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" + +# AIX doesn't seem to have soname support (weird...) +aix -> "$(CXX) -shared -fPIC" + +darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(SONAME)" +hpux -> "$(CXX) -shared -fPIC -Wl,+h,$(SONAME)" +solaris -> "$(CXX) -shared -fPIC -Wl,-h,$(SONAME)" +# Gotta use ld directly on BeOS, their GCC is busted +beos -> "ld -shared -h $(SONAME)" + + + +# Specializations first (they don't need to be, just clearer) +i386 -> "-mtune=i686 -momit-leaf-frame-pointer" +r10000 -> "-mips4" +alpha-ev67 -> "-mcpu=ev6" # FIXME: GCC 3.1 and on has -march=ev67 +alpha-ev68 -> "-mcpu=ev6" +alpha-ev7 -> "-mcpu=ev6" +ppc601 -> "-mpowerpc -mcpu=601" +sparc64-ultra3 -> "-mcpu=v9 -mtune=ultrasparc3" + +core2duo -> "-march=nocona -momit-leaf-frame-pointer" +em64t -> "-march=nocona -momit-leaf-frame-pointer" + +# Default family options (SUBMODEL is substitued with the real submodel) +# Anything after the quotes is what should be *removed* from the submodel name +# before it's put into SUBMODEL. +alpha -> "-mcpu=SUBMODEL" alpha- +amd64 -> "-momit-leaf-frame-pointer" +arm -> "-mcpu=SUBMODEL" +ia32 -> "-march=SUBMODEL -momit-leaf-frame-pointer" +ia64 -> "-mtune=SUBMODEL" +hppa -> "-march=SUBMODEL" hppa +m68k -> "-mSUBMODEL" +sh -> "-mSUBMODEL" sh +sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32- +sparc64 -> "-mcpu=v9 -mtune=ultrasparc" +mips32 -> "-mips1 -mcpu=SUBMODEL" mips32- +mips64 -> "-mips3 -mcpu=SUBMODEL" mips64- +ppc -> "-mcpu=SUBMODEL" ppc +ppc64 -> "-mcpu=SUBMODEL" ppc + + +# Note that the 'linking' bit means "use this for both compiling *and* linking" + +amd64 -> "-m64" +mips32 -> "-mabi=n32" +mips64 -> "-mabi=64" +s390 -> "-m31" +s390x -> "-m64" +sparc32 -> "-m32 -mno-app-regs" +sparc64 -> "-m64 -mno-app-regs" +ppc64 -> "-m64" + +# This should probably be used on most/all targets, but the docs are incomplete +openbsd -> "-pthread" +freebsd -> "-pthread" +netbsd -> "-pthread -D_NETBSD_SOURCE" +qnx -> "-fexceptions -D_QNX_SOURCE" + ============================================================ --- botan/misc/config/cc/hpcc fe395425b4097070162a67b827d43ecfb392287e +++ botan/misc/config/cc/hpcc fe395425b4097070162a67b827d43ecfb392287e @@ -0,0 +1,29 @@ +realname "HP-UX C++" + +binary_name "aCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "+O2" +check_opt_flags "+O2" +debug_flags "-g" +no_debug_flags "" +lang_flags "-AA -ext +eh -z" +warning_flags "" # +w +so_obj_flags "+Z" + +makefile_style unix + + +hppa1.0 -> "+DAportable" +hppa1.1 -> "+DA1.1" +hppa2.0 -> "+DA2.0W" + + + +default -> "$(CXX) +Z -b -Wl,+h,$(SONAME)" # Documented in cc(1), but not CC(1) (?) + ============================================================ --- botan/misc/config/cc/icc 7f8af2a729b9a249412a5f392b68708d760e15cf +++ botan/misc/config/cc/icc 7f8af2a729b9a249412a5f392b68708d760e15cf @@ -0,0 +1,30 @@ +realname "Intel C++" + +binary_name "icpc" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -ip -unroll" +check_opt_flags "-O2" +debug_flags "-g" +no_debug_flags "-fomit-frame-pointer" +lang_flags "" +warning_flags "-w1" +so_obj_flags "-fPIC" + +makefile_style unix + + +i686 -> "-march=pentium3" +athlon -> "-march=pentium3" +pentium4 -> "-march=pentium4" +core2duo -> "-msse3" + + + +default -> "$(CXX) -fPIC -shared" + ============================================================ --- botan/misc/config/cc/kai 61a0afad96346a53d75843a0e3c775e263365885 +++ botan/misc/config/cc/kai 61a0afad96346a53d75843a0e3c775e263365885 @@ -0,0 +1,27 @@ +realname "KAI C++" + +binary_name "KCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +ar_command "KCC -o" + +lib_opt_flags "+K3 --inline_auto_space_time=65 --abstract_pointer" +check_opt_flags "+K3" +lang_flags "-D__KAI_STRICT" +debug_flags "-g" +no_debug_flags "" + +makefile_style unix + + +default -> "$(CXX) --soname $(SONAME)" + + + +all -> "--one_per" + ============================================================ --- botan/misc/config/cc/mipspro 83a382a4c5c89c79124aaa5fea9543b9934a61e9 +++ botan/misc/config/cc/mipspro 83a382a4c5c89c79124aaa5fea9543b9934a61e9 @@ -0,0 +1,39 @@ +realname "SGI MIPSPro C++" + +binary_name "CC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:alias=TYPED" +check_opt_flags "-O3 -OPT:alias=TYPED" +debug_flags "-g3" +no_debug_flags "" +so_obj_flags "-KPIC" +lang_flags "-ansi -LANG:ansi-for-init-scope=ON" +# Disabled, because, while my code is fine, it warns about a lot of it's own +# headers +#warning_flags "-fullwarn" + +makefile_style unix + + +default -> "$(CXX) -shared -Wl,-soname,$(SONAME)" + + + +mips32 -> "-mips1" +mips64 -> "-mips3" + +mips64-r5000 -> "-mips4 -r5000" +mips64-r8000 -> "-mips4 -r8000" +mips64-r10000 -> "-mips4 -r10000" + + + +mips32 -> "-n32" +mips64 -> "-64" + ============================================================ --- botan/misc/config/cc/msvc f0fcdde68fcd833622fcb77df697118fd84bf3ff +++ botan/misc/config/cc/msvc f0fcdde68fcd833622fcb77df697118fd84bf3ff @@ -0,0 +1,20 @@ +realname "Visual C++" + +binary_name "cl /nologo" + +compile_option "/c " +output_to_option "/Fo" +add_include_dir_option "/I" +add_lib_dir_option "-L" +add_lib_option "" + +lib_opt_flags "/O2 /Ob2" +check_opt_flags "/O2" +debug_flags "/Zi" +no_debug_flags "" +lang_flags "/EHsc /GR /D_CONSOLE" +warning_flags "" + +ar_command "link /lib" + +makefile_style nmake ============================================================ --- botan/misc/config/cc/pgi 35dc70b946b7aa83deb8bf26560fa8ca40680c6e +++ botan/misc/config/cc/pgi 35dc70b946b7aa83deb8bf26560fa8ca40680c6e @@ -0,0 +1,28 @@ +realname "Portland Group C++" + +binary_name "pgCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-fast -Minline" +check_opt_flags "-fast" +so_obj_flags "-fPIC" + +makefile_style unix + + +linux -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" +solaris -> "$(CXX) -G -fPIC -Wl,-h,$(SONAME)" + + + +i586 -> "-tp p5" +i686 -> "-tp p6" +athlon -> "-tp k7" +pentium4 -> "-tp p6" +ia32 -> "-tp px" + ============================================================ --- botan/misc/config/cc/sgipro64 564ca86eb93141bee356b540e38aff20570ee977 +++ botan/misc/config/cc/sgipro64 564ca86eb93141bee356b540e38aff20570ee977 @@ -0,0 +1,27 @@ +realname "SGI Pro64" + +binary_name "sgiCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:alias=TYPED" +check_opt_flags "-O3 -OPT:alias=TYPED" +debug_flags "-g3" +no_debug_flags "" +so_obj_flags "-KPIC" +lang_flags "-ansi -LANG:ansi-for-init-scope=ON" +warning_flags "-Wall -W" + +makefile_style unix + + +default -> "$(CXX) -shared -Wl,-soname,$(SONAME)" + + + + + ============================================================ --- botan/misc/config/cc/sunwspro bdb44bb25abc0086d1c78c0b2efed958e614f8b6 +++ botan/misc/config/cc/sunwspro bdb44bb25abc0086d1c78c0b2efed958e614f8b6 @@ -0,0 +1,43 @@ +realname "Sun Workshop Pro C++" + +binary_name "CC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +# The compiler supports up to -xO5, but anything higher than -xO2 causes +# incorrect results, infinite loops, other badness. :( +lib_opt_flags "-xO2" +check_opt_flags "-xO2" +debug_flags "-g" +no_debug_flags "" +so_obj_flags "-KPIC" +warning_flags "+w" +lang_flags "+p -D__EXTENSIONS__" + +makefile_style unix + + +default -> "$(CXX) -G -h$(SONAME)" + + + +i386 -> "-xtarget=486" +i486 -> "-xtarget=486" +i586 -> "-xtarget=pentium" +i686 -> "-xtarget=pentium_pro" +pentium4 -> "-xtarget=pentium_pro" +k6 -> "-xtarget=pentium" + +sparc32-v9 -> "-xchip=ultra -xarch=v8" + +sparc32 -> "-xchip=ultra -xarch=SUBMODEL" sparc32- +sparc64 -> "-xchip=SUBMODEL" sparc64- + + + +sparc64 -> "-xarch=v9" + ============================================================ --- botan/misc/config/makefile/nmake.in 5982ee9b1c9e97433a1a1dbf14efa412585cf490 +++ botan/misc/config/makefile/nmake.in 5982ee9b1c9e97433a1a1dbf14efa412585cf490 @@ -0,0 +1,106 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +LIBDIR = $(INSTALLROOT)address@hidden:libdir} +HEADERDIR = $(INSTALLROOT)address@hidden:includedir}\botan +DOCDIR = $(INSTALLROOT)address@hidden:docdir}\Botan-$(VERSION) + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL = @{var:install_cmd_exec} +INSTALL_CMD = @{var:install_cmd_exec} +MKDIR = @md +MKDIR_INSTALL = @md +RM = @del /Q +RMDIR = @rmdir + +################################################## +# File Lists # +################################################## +CHECK = check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) + +LIBNAME = libbotan +STATIC_LIB = $(LIBNAME)address@hidden:static_suffix} + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## address@hidden:lib_build_cmds} + address@hidden:check_build_cmds} + +################################################## +# Link Commands # +################################################## +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + link /OUT:address@hidden $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) + +$(STATIC_LIB): $(LIBOBJS) + $(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS) + +################################################## +# Misc Targets # +################################################## +static: $(STATIC_LIB) + +################################################## +# Fake Targets # +################################################## +clean: + $(RM) @{var:build-dir}\lib\* @{var:build-dir}\checks\* + $(RM) $(LIBRARIES) $(CHECK) + +distclean: clean + $(RM) @{var:build-dir}\build.h + $(RM) @{var:build-dir}\include\botan\* + $(RMDIR) @{var:build-dir}\include\botan @{var:build-dir}\include + $(RMDIR) @{var:build-dir}\lib @{var:build-dir}\checks + $(RMDIR) @{var:build-dir} + $(RM) Makefile + +################################################## +# Install Commands # +################################################## +install: $(LIBRARIES) + $(ECHO) "Install command not implemented" ============================================================ --- botan/misc/config/makefile/unix.in ee7062ad81b0ecd648a13a863a0876bbccdaee45 +++ botan/misc/config/makefile/unix.in ee7062ad81b0ecd648a13a863a0876bbccdaee45 @@ -0,0 +1,120 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +BINDIR = $(INSTALLROOT)/bin +LIBDIR = $(INSTALLROOT)/@{var:libdir} +HEADERDIR = $(INSTALLROOT)/@{var:includedir}/botan +DOCDIR = $(INSTALLROOT)/@{var:docdir}/Botan-$(VERSION) + +OWNER = @{var:install_user} +GROUP = @{var:install_group} + +CONFIG_SCRIPT = @{var:botan-config} + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL_CMD_EXEC = @{var:install_cmd_exec} +INSTALL_CMD_DATA = @{var:install_cmd_data} +LN = ln -fs +MKDIR = @mkdir +MKDIR_INSTALL = @umask 022; mkdir -p -m 755 +RANLIB = @{var:ranlib_command} +RM = @rm -f +RM_R = @rm -rf + +################################################## +# File Lists # +################################################## +CHECK = @{var:check_prefix}check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) + +LIBNAME = @{var:lib_prefix}libbotan +STATIC_LIB = $(LIBNAME).a + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## address@hidden:lib_build_cmds} + address@hidden:check_build_cmds} + +################################################## +# Link Commands # +################################################## +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + $(CXX) $(CHECKOBJS) -L. -lbotan $(LINK_TO) -o $(CHECK) + +$(STATIC_LIB): $(LIBOBJS) + $(RM) $(STATIC_LIB) + $(AR) $(STATIC_LIB) $(LIBOBJS) + $(RANLIB) $(STATIC_LIB) + +################################################## +# Fake Targets # +################################################## +.PHONY = clean distclean install static + +static: $(STATIC_LIB) + +clean: + $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/* + $(RM) $(LIBRARIES) $(SYMLINK) $(CHECK) + +distclean: clean + $(RM_R) @{var:build-dir} + $(RM) Makefile $(CONFIG_SCRIPT) + +install: $(LIBRARIES) + $(ECHO) "Installing Botan into $(INSTALLROOT)... " + $(MKDIR_INSTALL) $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) + $(MKDIR_INSTALL) $(LIBDIR) + $(MKDIR_INSTALL) $(BINDIR) + @for i in $(DOCS); do \ + $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ + done + @for i in $(HEADERS); do \ + $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ + done + @$(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) + @$(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) ============================================================ --- botan/misc/config/makefile/unix_shr.in ae60f52d0264845e124e1686b9d0ee0cd94e6d4d +++ botan/misc/config/makefile/unix_shr.in ae60f52d0264845e124e1686b9d0ee0cd94e6d4d @@ -0,0 +1,135 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +SO_OBJ_FLAGS = @{var:so_obj_flags} +SO_LINK_CMD = @{var:so_link} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +BINDIR = $(INSTALLROOT)/bin +LIBDIR = $(INSTALLROOT)/@{var:libdir} +HEADERDIR = $(INSTALLROOT)/@{var:includedir}/botan +DOCDIR = $(INSTALLROOT)/@{var:docdir}/Botan-$(VERSION) + +OWNER = @{var:install_user} +GROUP = @{var:install_group} + +CONFIG_SCRIPT = @{var:botan-config} + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL_CMD_EXEC = @{var:install_cmd_exec} +INSTALL_CMD_DATA = @{var:install_cmd_data} +LN = ln -fs +MKDIR = @mkdir +MKDIR_INSTALL = @umask 022; mkdir -p -m 755 +RANLIB = @{var:ranlib_command} +RM = @rm -f +RM_R = @rm -rf + +################################################## +# File Lists # +################################################## +CHECK = @{var:check_prefix}check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) $(SHARED_LIB) + +LIBNAME = @{var:lib_prefix}libbotan +STATIC_LIB = $(LIBNAME).a + +SHARED_LIB = $(LIBNAME)-$(MAJOR).$(MINOR).$(PATCH)address@hidden:so_suffix} +SONAME = $(LIBNAME)-$(MAJOR).$(MINOR).$(PATCH)address@hidden:so_suffix} + +SYMLINK = address@hidden:so_suffix} + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## address@hidden:lib_build_cmds} + address@hidden:check_build_cmds} + +################################################## +# Link Commands # +################################################## +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + $(CXX) $(CHECKOBJS) -L. -lbotan $(LINK_TO) -o $(CHECK) + +$(STATIC_LIB): $(LIBOBJS) + $(RM) $(STATIC_LIB) + $(AR) $(STATIC_LIB) $(LIBOBJS) + $(RANLIB) $(STATIC_LIB) + +$(SHARED_LIB): $(LIBOBJS) + $(SO_LINK_CMD) $(LINK_TO) $(LIBOBJS) -o $(SHARED_LIB) + $(LN) $(SHARED_LIB) $(SYMLINK) + +################################################## +# Fake Targets # +################################################## +.PHONY = clean distclean install static shared + +static: $(STATIC_LIB) + +shared: $(SHARED_LIB) + +clean: + $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/* + $(RM) $(LIBRARIES) $(SYMLINK) $(CHECK) + +distclean: clean + $(RM_R) @{var:build-dir} + $(RM) Makefile $(CONFIG_SCRIPT) + +install: $(LIBRARIES) + $(ECHO) "Installing Botan into $(INSTALLROOT)... " + $(MKDIR_INSTALL) $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) + $(MKDIR_INSTALL) $(LIBDIR) + $(MKDIR_INSTALL) $(BINDIR) + @for i in $(DOCS); do \ + $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ + done + @for i in $(HEADERS); do \ + $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ + done + @$(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) + @$(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) + @$(INSTALL_CMD_EXEC) $(SHARED_LIB) $(LIBDIR) + $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SYMLINK) ============================================================ --- botan/misc/config/os/aix 1ae489a4423d56d58cdfa6a2c3ec5c52a8e044f4 +++ botan/misc/config/os/aix 1ae489a4423d56d58cdfa6a2c3ec5c52a8e044f4 @@ -0,0 +1,7 @@ +realname "AIX" + +os_type unix + + +all + ============================================================ --- botan/misc/config/os/beos 1bb820a522401f7aaa56bead761b6e6c29fa9626 +++ botan/misc/config/os/beos 1bb820a522401f7aaa56bead761b6e6c29fa9626 @@ -0,0 +1,16 @@ +realname "BeOS" + +os_type beos + +install_root /boot/beos +header_dir ../develop/headers +lib_dir system/lib +doc_dir documentation + + +all + + + +haiku + ============================================================ --- botan/misc/config/os/cygwin da74ebac5f9ddd009c73255200998cb25295e830 +++ botan/misc/config/os/cygwin da74ebac5f9ddd009c73255200998cb25295e830 @@ -0,0 +1,13 @@ +realname "Cygwin" + +os_type unix + +install_root c:\Botan +doc_dir docs + +# Cygwin supports shared libs fine, but there are problems with making a Botan +# shared library when libraries it depends on are static-only (such as libz). +# So until I can figure out a work-around, it's disabled. + +#all + ============================================================ --- botan/misc/config/os/darwin 955f562d8e542ac0e6a4cef84cd7560603fcd33c +++ botan/misc/config/os/darwin 955f562d8e542ac0e6a4cef84cd7560603fcd33c @@ -0,0 +1,28 @@ +realname "Darwin / MacOS X" + +os_type unix + +so_suffix dylib + +# It doesn't have the 's' option; you need to use needs ranlib +ar_command "ar cr" +ar_needs_ranlib yes + +install_group wheel + +doc_dir doc + + +all + + + +ia32 +amd64 +ppc +ppc64 # g5! + + + +macosx + ============================================================ --- botan/misc/config/os/defaults afae15ccadd0aff96811073ccef511d586b48474 +++ botan/misc/config/os/defaults afae15ccadd0aff96811073ccef511d586b48474 @@ -0,0 +1,21 @@ +# Defaults are for a Unix box, since that's what most of OS variants are. It +# would be nice to have generic 'windows', 'beos', 'unix', etc targets to +# handle defaults for those classes of OSes, though Unix is by far the most +# varied/fragmented + +obj_suffix o +so_suffix so +static_suffix a + +ar_command "ar crs" +ar_needs_ranlib no + +install_root /usr/local +header_dir include +lib_dir lib +doc_dir share/doc + +install_user root +install_group root +install_cmd_data install -o OWNER -g GROUP -m 644 +install_cmd_exec install -o OWNER -g GROUP -m 755 ============================================================ --- botan/misc/config/os/freebsd d7d4d7710c19332222b65f041853c5fb10617259 +++ botan/misc/config/os/freebsd d7d4d7710c19332222b65f041853c5fb10617259 @@ -0,0 +1,9 @@ +realname "FreeBSD" + +os_type unix + +install_group wheel + + +all + ============================================================ --- botan/misc/config/os/hpux 3259c76e44c088eb2c46c104e4628fde63841e8f +++ botan/misc/config/os/hpux 3259c76e44c088eb2c46c104e4628fde63841e8f @@ -0,0 +1,13 @@ +realname "HP-UX" + +os_type unix + +so_suffix sl + + +all + + + +hp-ux + ============================================================ --- botan/misc/config/os/irix cc8d00e11363d56828dd5b1084ff3af9e9bb76fd +++ botan/misc/config/os/irix cc8d00e11363d56828dd5b1084ff3af9e9bb76fd @@ -0,0 +1,7 @@ +realname "IRIX" + +os_type unix + + +all + ============================================================ --- botan/misc/config/os/linux 566c9d6827c1ea19baabb82d547a6231d18fca45 +++ botan/misc/config/os/linux 566c9d6827c1ea19baabb82d547a6231d18fca45 @@ -0,0 +1,8 @@ +realname "Linux" + +os_type unix + +# Is this correct? + +all + ============================================================ --- botan/misc/config/os/netbsd c09645e6aab081667e61307d0536b0adc15186b9 +++ botan/misc/config/os/netbsd c09645e6aab081667e61307d0536b0adc15186b9 @@ -0,0 +1,9 @@ +realname "NetBSD" + +os_type unix + +install_group wheel + + +all + ============================================================ --- botan/misc/config/os/openbsd d1cf34508f82296b77ac1c05a2b8e4ec0e9ef8f7 +++ botan/misc/config/os/openbsd d1cf34508f82296b77ac1c05a2b8e4ec0e9ef8f7 @@ -0,0 +1,9 @@ +realname "OpenBSD" + +os_type unix + +install_group wheel + + +all + ============================================================ --- botan/misc/config/os/qnx 7a8fa58bccdf45e7aacadf9c48ba2c21c75af46e +++ botan/misc/config/os/qnx 7a8fa58bccdf45e7aacadf9c48ba2c21c75af46e @@ -0,0 +1,7 @@ +realname "QNX" + +os_type unix + + +all + ============================================================ --- botan/misc/config/os/solaris 42ccff72aea7d428a33b639eda96e613cc4c33ea +++ botan/misc/config/os/solaris 42ccff72aea7d428a33b639eda96e613cc4c33ea @@ -0,0 +1,14 @@ +realname "Solaris" + +os_type unix + +install_cmd_data install -u OWNER -g GROUP -m 644 +install_cmd_exec install -u OWNER -g GROUP -m 755 + + +all + + + +sunos + ============================================================ --- botan/misc/config/os/tru64 c9f88ca6171640c19f649b8ce5f0b5a44c6f2a02 +++ botan/misc/config/os/tru64 c9f88ca6171640c19f649b8ce5f0b5a44c6f2a02 @@ -0,0 +1,11 @@ +realname "Tru64" + +os_type unix + + +all + + + +osf1 + ============================================================ --- botan/misc/config/os/windows e36531bad64840b7551ca36b03f8063fa24155ff +++ botan/misc/config/os/windows e36531bad64840b7551ca36b03f8063fa24155ff @@ -0,0 +1,25 @@ +realname "MS Windows" + +os_type windows + +obj_suffix obj +so_suffix dll +static_suffix lib + +install_root c:\Botan +doc_dir docs + +install_cmd_data copy +install_cmd_exec copy + +install_user +install_group + + +#all + + + +win32 +mswin32 + ============================================================ --- botan/modules/es_capi/modinfo.txt 30e09336bd70f66edfc3953f72f0cae2e2d50991 +++ botan/modules/es_capi/modinfo.txt 30e09336bd70f66edfc3953f72f0cae2e2d50991 @@ -0,0 +1,21 @@ +realname "Win32 CryptoAPI Entropy Source" + +define ENTROPY_SRC_CAPI +load_on auto +modset win32 + + +es_capi.h +es_capi.cpp + + +# We'll just assume CAPI is there; this is OK except for 3.x, early versions +# of 95, and maybe NT 3.5 + +windows +cygwin + + + +windows -> advapi32 + ============================================================ --- botan/modules/es_dev/modinfo.txt 8fbe774458a9a8b1699bef59ebaab7bb89c75c06 +++ botan/modules/es_dev/modinfo.txt 8fbe774458a9a8b1699bef59ebaab7bb89c75c06 @@ -0,0 +1,27 @@ +realname "RNG Device Reader" + +define ENTROPY_SRC_DEVICE + +load_on auto +modset unix + + +es_dev.h +es_dev.cpp + + + +aix +beos +cygwin +darwin +freebsd +hpux +irix +linux +netbsd +openbsd +qnx +solaris +tru64 + ============================================================ --- botan/modules/es_egd/modinfo.txt 11617d320ffae85830cfc628f3cd34be3a4d7b0a +++ botan/modules/es_egd/modinfo.txt 11617d320ffae85830cfc628f3cd34be3a4d7b0a @@ -0,0 +1,31 @@ +realname "EGD Entropy Source" + +define ENTROPY_SRC_EGD + +load_on auto +modset unix + + +es_egd.h +es_egd.cpp + + + +solaris -> socket +qnx -> socket + + + +aix +cygwin +darwin +freebsd +hpux +irix +linux +netbsd +openbsd +qnx +solaris +tru64 + ============================================================ --- botan/modules/es_win32/modinfo.txt e04adc51c45928e40c22e2a9f696386a22aa0f17 +++ botan/modules/es_win32/modinfo.txt e04adc51c45928e40c22e2a9f696386a22aa0f17 @@ -0,0 +1,23 @@ +realname "Win32 Entropy Source" + +# Probably not much of an issue anymore +#note "This module will not run under NT4" + +define ENTROPY_SRC_WIN32 +modset win32 + +load_on auto + + +es_win32.h +es_win32.cpp + + + +windows +cygwin + + + +windows -> user32 + ============================================================ --- Makefile.am 867f5d72609048dcedd2982a6dccff7958dadc75 +++ Makefile.am 9dc6dc47bb6ffd8bb30fdea3cfb93af57fb8bc11 @@ -1,2 +1,2 @@ ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = po netxx lua botan monotone -SUBDIRS = po netxx lua monotone ============================================================ --- configure.ac 3f76f442e8f46ee313fd76c33e4640e9e642a64b +++ configure.ac 412a36fa2ba992a81bc17f9ba0a64fe3fdc6ff46 @@ -157,4 +157,11 @@ AC_SUBST(LIB3RDPARTY_CXXFLAGS) AC_SUBST(LIB3RDPARTY_CFLAGS) AC_SUBST(LIB3RDPARTY_CXXFLAGS) +AC_CONFIG_COMMANDS([botan], +[( + mkdir -p botan + cd botan + ../$srcdir/botan/configure.pl +)]) + AC_OUTPUT ============================================================ --- monotone/Makefile.am fd5e00f0f45818168ced8b1872548141a2e57668 +++ monotone/Makefile.am 6734ef8f2516168902519ec3c770f96bf06745d2 @@ -88,104 +88,6 @@ MOST_SOURCES = \ specialized_lexical_cast.cc lexical_cast.hh \ i18n.h parallel_iter.hh safe_map.hh pch.hh current_exception.hh -BOTAN_SOURCES = \ - botan/aes.cpp botan/aes_tab.cpp \ - botan/arc4.cpp botan/alg_id.cpp \ - botan/asn1_alt.cpp botan/asn1_att.cpp botan/asn1_dn.cpp \ - botan/asn1_ku.cpp botan/asn1_oid.cpp \ - botan/asn1_str.cpp botan/asn1_tm.cpp \ - botan/base.cpp botan/base64.cpp botan/basefilt.cpp \ - botan/ber_dec.cpp botan/big_base.cpp \ - botan/big_code.cpp botan/big_io.cpp botan/big_ops2.cpp \ - botan/big_ops3.cpp botan/blinding.cpp botan/buf_es.cpp \ - botan/buf_filt.cpp botan/cbc.cpp botan/cbc_mac.cpp botan/certstor.cpp \ - botan/cfb.cpp botan/charset.cpp botan/crc32.cpp \ - botan/crl_ent.cpp botan/ctr.cpp botan/cts.cpp \ - botan/data_snk.cpp botan/data_src.cpp \ - botan/def_ops.cpp botan/defalloc.cpp \ - botan/der_enc.cpp botan/divide.cpp botan/dl_algo.cpp \ - botan/dl_group.cpp botan/dsa_gen.cpp \ - botan/dlies.cpp botan/eax.cpp botan/ecb.cpp botan/eme1.cpp \ - botan/eme_pkcs.cpp botan/emsa1.cpp botan/emsa2.cpp \ - botan/emsa3.cpp botan/emsa4.cpp botan/emsa_raw.cpp \ - botan/eng_base.cpp botan/engine.cpp \ - botan/exceptn.cpp botan/filter.cpp botan/filters.cpp \ - botan/fips140.cpp \ - botan/get_algo.cpp botan/get_enc.cpp botan/get_pbe.cpp \ - botan/hash_id.cpp botan/hex.cpp botan/hmac.cpp \ - botan/if_algo.cpp botan/init_def.cpp \ - botan/kdf.cpp botan/keypair.cpp botan/look_pk.cpp \ - botan/make_prm.cpp botan/mdx_hash.cpp \ - botan/mem_pool.cpp botan/mgf1.cpp botan/mlock.cpp \ - botan/mode_pad.cpp botan/modebase.cpp \ - botan/mp_comba.cpp botan/mp_mulop.cpp \ - botan/mp_misc.cpp botan/mp_mul.cpp botan/mp_shift.cpp \ - botan/mutex.cpp botan/numthry.cpp \ - botan/ofb.cpp botan/oids.cpp botan/parsing.cpp botan/pbes1.cpp \ - botan/pbes2.cpp botan/pem.cpp botan/pipe.cpp botan/pipe_io.cpp \ - botan/pipe_rw.cpp botan/pk_algs.cpp botan/pk_core.cpp \ - botan/pk_filts.cpp botan/pk_keys.cpp botan/pk_util.cpp \ - botan/pkcs10.cpp botan/pkcs8.cpp botan/policy.cpp \ - botan/pow_mod.cpp \ - botan/prf_x942.cpp botan/primes.cpp botan/pubkey.cpp \ - botan/randpool.cpp botan/reducer.cpp botan/rng.cpp \ - botan/rsa.cpp botan/s2k.cpp botan/secqueue.cpp \ - botan/sha160.cpp botan/symkey.cpp botan/timers.cpp \ - botan/ui.cpp botan/util.cpp botan/x509_ca.cpp \ - botan/x509_crl.cpp botan/x509_key.cpp botan/x509_obj.cpp \ - botan/x509cert.cpp botan/x509find.cpp botan/x509opt.cpp \ - botan/des.cpp botan/des_tab.cpp botan/pkcs5.cpp \ - botan/x509self.cpp botan/x509stor.cpp \ - botan/def_alg.cpp botan/def_mode.cpp botan/sha256.cpp \ - botan/x931_rng.cpp botan/out_buf.cpp botan/bit_ops.cpp \ - botan/big_rand.cpp botan/def_powm.cpp botan/libstate.cpp \ - botan/modules.cpp botan/mp_numth.cpp \ - botan/mp_sqr.cpp botan/powm_fw.cpp \ - botan/powm_mnt.cpp botan/mp_asm.cpp \ - botan/asn1_int.cpp botan/config.cpp botan/datastor.cpp \ - botan/def_char.cpp botan/init_opt.cpp botan/jacobi.cpp \ - botan/x509_ext.cpp botan/x509stat.cpp botan/dh.cpp \ - \ - botan/aes.h botan/botan.h botan/es_win32.h \ - botan/lookup.h botan/randpool.h botan/version.h \ - botan/buf_es.h botan/der_enc.h \ - botan/exceptn.h botan/mdx_hash.h \ - botan/reducer.h botan/x509_ca.h botan/allocate.h \ - botan/buf_filt.h botan/dh.h botan/filter.h botan/mem_ops.h \ - botan/pbe.h botan/rng.h botan/x509cert.h botan/arc4.h \ - botan/cbc.h botan/dl_algo.h botan/filters.h botan/mem_pool.h \ - botan/pbe_pkcs.h botan/rsa.h botan/x509_crl.h \ - botan/certstor.h botan/dlies.h botan/fips140.h botan/mgf1.h \ - botan/pem.h botan/s2k.h botan/x509_key.h botan/asn1_obj.h \ - botan/cfb.h botan/modebase.h \ - botan/pipe.h botan/x509_obj.h \ - botan/asn1_oid.h botan/eax.h \ - botan/mode_pad.h botan/pk_algs.h botan/secmem.h \ - botan/x509find.h botan/x509self.h botan/config.h botan/ecb.h \ - botan/hex.h botan/pk_core.h botan/secqueue.h \ - botan/x509stor.h botan/base64.h botan/crc32.h botan/eme.h \ - botan/hmac.h botan/mp_core.h botan/pkcs10.h botan/sha160.h \ - botan/crl_ent.h botan/emsa.h botan/eng_def.h \ - botan/if_algo.h botan/pkcs8.h \ - botan/basefilt.h botan/ctr.h botan/engine.h botan/es_dev.h \ - botan/init.h botan/mp_types.h botan/pk_filts.h botan/symkey.h \ - botan/base.h botan/cts.h botan/enums.h botan/kdf.h \ - botan/mutex.h botan/pk_keys.h botan/timers.h botan/ber_dec.h \ - botan/data_snk.h botan/es_capi.h botan/keypair.h \ - botan/numthry.h botan/pk_ops.h botan/types.h botan/bigint.h \ - botan/data_src.h botan/es_egd.h botan/look_add.h botan/ofb.h \ - botan/pk_util.h botan/ui.h botan/blinding.h botan/defalloc.h \ - botan/look_pk.h botan/oids.h botan/pubkey.h \ - botan/util.h botan/charset.h botan/hash_id.h \ - botan/des.h botan/pkcs5.h \ - botan/x931_rng.h botan/sha256.h \ - botan/parsing.h botan/out_buf.h botan/bit_ops.h \ - botan/def_powm.h botan/dl_group.h botan/libstate.h \ - botan/modules.h botan/mp_asm.h botan/pow_mod.h botan/mp_asmi.h \ - botan/build.h botan/asn1_int.h botan/datastor.h botan/def_char.h \ - botan/stl_util.h botan/x509_ext.h botan/x509stat.h \ - botan/alg_id.h botan/cbc_mac.h botan/loadstor.h - BOOST_SANDBOX_SOURCES = \ boost/circular_buffer_adaptor.hpp \ boost/circular_buffer_base.hpp \ @@ -308,7 +210,6 @@ lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_ noinst_LIBRARIES = libplatform.a lib3rdparty.a libplatform_a_SOURCES = platform.hh tester-plaf.hh lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \ - $(BOTAN_SOURCES) \ $(IDNA_SOURCES) \ $(SQLITE_SOURCES) @@ -395,12 +296,10 @@ if WIN32_PLATFORM mtn_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi unit_tester_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi lib3rdparty_a_CPPFLAGS += -DWIN32 - lib3rdparty_a_SOURCES += botan/es_capi.cpp botan/es_win32.cpp tester_SOURCES += win32/tester-plaf.cc else libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES) mtn_SOURCES += unix/main.cc - lib3rdparty_a_SOURCES += botan/es_dev.cpp tester_SOURCES += unix/tester-plaf.cc endif