1// $Id$ 2// vim:ft=javascript 3 4ARG_ENABLE("zip", "ZIP support", "yes"); 5 6if (PHP_ZIP != "no") { 7 if (CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS_ZIP", "..\\zlib;" + PHP_ZIP) && 8 CHECK_HEADER_ADD_INCLUDE("zipconf.h", "CFLAGS_ZIP", configure_module_dirname + "\\lib;" + PHP_ZIP) && 9 (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib", "zip", PHP_ZIP) || CHECK_LIB("zlib.lib", "zip", PHP_ZIP))) || 10 (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "zip", PHP_ZIP)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) 11 ) { 12 EXTENSION('zip', 'php_zip.c zip_stream.c'); 13 ADD_SOURCES(configure_module_dirname + "/lib", "zip_add.c zip_add_dir.c zip_add_entry.c\ 14 zip_close.c zip_delete.c zip_dir_add.c zip_dirent.c zip_discard.c zip_entry.c\ 15 zip_err_str.c zip_error.c zip_error_clear.c zip_error_get.c zip_error_get_sys_type.c\ 16 zip_error_strerror.c zip_error_to_str.c zip_extra_field.c zip_extra_field_api.c\ 17 zip_fclose.c zip_fdopen.c zip_file_add.c zip_file_error_clear.c zip_file_error_get.c\ 18 zip_file_get_comment.c zip_file_get_offset.c zip_file_rename.c zip_file_replace.c\ 19 zip_file_set_comment.c zip_file_strerror.c zip_filerange_crc.c zip_fopen.c\ 20 zip_fopen_encrypted.c zip_fopen_index.c zip_fopen_index_encrypted.c zip_fread.c\ 21 zip_get_archive_comment.c zip_get_archive_flag.c zip_get_compression_implementation.c\ 22 zip_get_encryption_implementation.c zip_get_file_comment.c zip_get_name.c zip_get_num_entries.c \ 23 zip_get_num_files.c zip_memdup.c zip_name_locate.c zip_new.c zip_open.c zip_rename.c zip_replace.c\ 24 zip_hash.c \ 25 zip_set_archive_comment.c zip_set_archive_flag.c zip_set_default_password.c zip_set_file_comment.c\ 26 zip_set_file_compression.c zip_set_name.c zip_source_buffer.c zip_source_close.c zip_source_crc.c\ 27 zip_source_deflate.c zip_source_error.c zip_source_filep.c zip_source_free.c\ 28 zip_source_function.c zip_source_layered.c zip_source_open.c zip_source_pkware.c \ 29 zip_source_read.c zip_source_stat.c zip_source_window.c zip_source_zip.c zip_source_zip_new.c\ 30 zip_stat.c zip_stat_index.c zip_stat_init.c zip_strerror.c zip_string.c zip_unchange.c zip_unchange_all.c\ 31 zip_unchange_archive.c zip_unchange_data.c zip_utf-8.c mkstemp.c \ 32 zip_file_set_external_attributes.c zip_file_get_external_attributes.c zip_source_write.c \ 33 zip_source_call.c zip_source_supports.c zip_buffer.c zip_source_seek.c zip_source_tell.c \ 34 zip_io_util.c zip_source_remove.c zip_source_rollback_write.c zip_source_commit_write.c \ 35 zip_source_tell_write.c zip_source_begin_write.c zip_source_seek_write.c \ 36 zip_source_win32a.c zip_source_win32utf8.c zip_source_win32handle.c zip_source_win32w.c", "zip"); 37 38 AC_DEFINE('HAVE_ZIP', 1); 39 ADD_FLAG("CFLAGS_ZIP", "/D _WIN32"); 40 } else { 41 WARNING("zip not enabled; libraries and headers not found"); 42 } 43} 44