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

Improve build script #81

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Improve build script #81

wants to merge 4 commits into from

Commits on Jul 17, 2020

  1. java/jni/client.c: add support for OpenSSL 1.1

    This shall allow the java/jni to build with and link against OpenSSL 1.1.
    
    Additionally, the configuration program will not attempt to process the
    java/jni/ subdirectory if no --enable-jni has been specified.
    
    Signed-off-by: Aleksandr Makarov <[email protected]>
    Aleksandr Makarov committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    a74327a View commit details
    Browse the repository at this point in the history
  2. Add --{enable,disable}-examples flag to toggle examples compilation

    Signed-off-by: Aleksandr Makarov <[email protected]>
    Aleksandr Makarov committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    0d6b817 View commit details
    Browse the repository at this point in the history
  3. Add --with-system-libsafec flag to link against system libsafec

    Specifying the --with-system-libsafec flag shall allow the configuration
    program to search for and, if found, to link against the libsafec library
    that is installed in the system.
    
    After configuring --with-system-libsafec, the compilation will may with
    following error:
    
    In file included from /usr/include/libsafec/safe_lib.h:43,
                      from est_server_http.c:39:
    /usr/include/libsafec/safe_types.h:42:9: error: unknown type name 'size_t'
       42 | typedef size_t  rsize_t;
          |         ^~~~~~
    
    The system libsafec lacks including stddef.h in its safe_types.h.
    
    Fix that by moving libsafec include directives below the openssl; the latter apparently
    does the inclusion of the necessary stddef.h at some point.
    
    Signed-off-by: Aleksandr Makarov <[email protected]>
    Aleksandr Makarov committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    0f8de87 View commit details
    Browse the repository at this point in the history
  4. configure.ac: Fix AC_ARG_ENABLE/AC_ARG_WITH macros

    Multiple tests in configure.ac are flawed:
    
    [--snip--]
        AC_ARG_ENABLE([pthreads],
                [AS_HELP_STRING([--disable-pthreads],
                                [Disable support for pthreads])],
                [pthreads_on=1],
                [pthreads_on=0])
    [--snip--]
    
    The third argument is "action-if-given" and the fourth argument
    is "action-if-not-given" [0]. Which means that, whether you pass
    --enable-pthreads or --disable-pthreads, the third argument will be
    executed, that is "pthreads_on=1". And if you pass neither, the fourth
    argument will be executed, i.e. "pthreads_on=0".
    
    We want `--enable-pthreads` and `--disable-pthreads` flags to do their job.
    The right way to do that will be to eliminate "action-if-given" and replace
    the user-defined `FEATURE_on=0|1` shell variables with the `enable_FEATURE`
    and `with_PACKAGE` shell variables provided by Autotools.
    
    [0] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/autoconf.html#Package-Options
    
    Signed-off-by: Aleksandr Makarov <[email protected]>
    Aleksandr Makarov committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    af537b3 View commit details
    Browse the repository at this point in the history