I know the APR doesn't have support on Android, but I really would like to use it.
For other libraries i followed this NDK guide. But APR has a more complex ./configure script which checks more things.
I'm sure that modifying something is needed. But I'm not as much experienced on this library to know where to start.
I've tried to build-it setting parameters before the configure script. I've managed to run thought 80% of the script, but modifying some variables (looking at config.log):
ac_cv_file__dev_zero=yes
ac_cv_func_getpgrp_void=no
ac_cv_func_setpgrp_void=yes
ac_cv_func_memcmp_working=yes
rb_cv_binary_elf=no
rb_cv_negative_time_t=no
ac_rc=no
pr_cv_mutex_robust_shared=no
apr_cv_tcp_nodelay_with_crok=yes
Modify more variables like this and let's run more "tests" of the script. But are thease variables rellevant? Will this cause some trouble when using the libary? Is this the right way to build it to Andoird or I shuld do something else?
Thanks!
-
More of a FYI, as Android isn't full Linux POSIX, you can use pseudo Linux environment like Termux as it appears that Termux does support Apache Portable RuntimeMorrison Chang– Morrison Chang2023年09月05日 22:59:05 +00:00Commented Sep 5, 2023 at 22:59
-
I've read about it. I suppose the Termux needs to be installed alongside my app. I wonder if any linux subsystem for android apps exists.Pol Ros– Pol Ros2023年09月07日 07:52:45 +00:00Commented Sep 7, 2023 at 7:52
1 Answer 1
I also managed to build apr-1.7.4 in android NDK with the options
ac_cv_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_process_shared_works=yes apr_cv_mutex_robust_shared=yes apr_cv_tcp_nodelay_with_cork=yes
to ./configure. I don't see any problems with the application depending on apr-1 yet.