Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include files not copied on install #144

Closed
jasny opened this issue May 20, 2019 · 3 comments
Closed

Include files not copied on install #144

jasny opened this issue May 20, 2019 · 3 comments

Comments

@jasny
Copy link

jasny commented May 20, 2019

Ds is not usable from other PHP extensions, because the header files are not copied to the PHP include directory.

This should be done using PHP_INSTALL_HEADERS in config.m4 and config.w32.

@jasny
Copy link
Author

jasny commented May 20, 2019

The following should work, though it can probably be done nicer.

It also puts everything in include/ext/ds/src/. It doesn't seem like it possible to set a custom base dir with the PHP_INSTALL_HEADERS macro.

PHP_INSTALL_HEADERS(ext/ds, [
    php_ds.h
    src/common.h
    src/ds/ds_deque.h
    src/ds/ds_htable.h
    src/ds/ds_map.h
    src/ds/ds_priority_queue.h
    src/ds/ds_queue.h
    src/ds/ds_set.h
    src/ds/ds_stack.h
    src/ds/ds_vector.h
    src/php/arginfo.h
    src/php/parameters.h
    src/php/classes/php_collection_ce.h
    src/php/classes/php_deque_ce.h
    src/php/classes/php_hashable_ce.h
    src/php/classes/php_map_ce.h
    src/php/classes/php_pair_ce.h
    src/php/classes/php_priority_queue_ce.h
    src/php/classes/php_queue_ce.h
    src/php/classes/php_sequence_ce.h
    src/php/classes/php_set_ce.h
    src/php/classes/php_stack_ce.h
    src/php/classes/php_vector_ce.h
    src/php/handlers/php_common_handlers.h
    src/php/handlers/php_deque_handlers.h
    src/php/handlers/php_map_handlers.h
    src/php/handlers/php_pair_handlers.h
    src/php/handlers/php_priority_queue_handlers.h
    src/php/handlers/php_queue_handlers.h
    src/php/handlers/php_set_handlers.h
    src/php/handlers/php_stack_handlers.h
    src/php/handlers/php_vector_handlers.h
    src/php/iterators/php_deque_iterator.h
    src/php/iterators/php_htable_iterator.h
    src/php/iterators/php_map_iterator.h
    src/php/iterators/php_priority_queue_iterator.h
    src/php/iterators/php_queue_iterator.h
    src/php/iterators/php_set_iterator.h
    src/php/iterators/php_stack_iterator.h
    src/php/iterators/php_vector_iterator.h
    src/php/objects/php_deque.h
    src/php/objects/php_map.h
    src/php/objects/php_pair.h
    src/php/objects/php_priority_queue.h
    src/php/objects/php_queue.h
    src/php/objects/php_set.h
    src/php/objects/php_stack.h
    src/php/objects/php_vector.h
])

@rtheunissen
Copy link
Member

I'm not sure if we should be installing all headers this way. I think we should consider this as a priority in 2.0 to have a public internal API that is designed with other extensions in mind. This is solid though - could you please PR this and confirm it works? Happy to merge.

@rtheunissen
Copy link
Member

@jasny I'd like to consider this specifically as part of v2 - I'm not comfortable to expose this currently because I didn't consider it when I was writing 1.x. Nice to know about PHP_INSTALL_HEADERS 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants