diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-04-17 13:56:56 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-04-17 13:56:56 (GMT) |
commit | 58afc7858cffe180bafbae306db6be66d313b74b (patch) | |
tree | 6ccba3064e1b1d49faf1099d3d6fe3c600192819 /configure.ac | |
parent | b25638b8b13ffa833414c6a7c48fffdac12eda61 (diff) |
Remove hardcoded run paths from libraries.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 68 |
1 files changed, 56 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 291acca..5c383a7 100644 --- a/configure.ac +++ b/configure.ac @@ -210,27 +210,50 @@ AC_DEFINE_UNQUOTED(LOCALE_DIR, "${basedir}/share/locale") # Compilation options ############################################################ -AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [compile with debugging support [default=no]]), +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug], [compile with debugging support [default=no]]), [], [enable_debug=no]) -AC_ARG_WITH(gobject-leak-tracker, +AC_ARG_ENABLE([python-bindings], + AS_HELP_STRING([--disable-python-bindings], [disable Python bindings [default=no]]), + [], [enable_python_bindings=yes]) + +AC_ARG_ENABLE([python-package], + AS_HELP_STRING([--enable-python-package], [configure the compilation for building a Python binary distribution [default=no]]), + [build_python_package=$enableval], [build_python_package=no]) + +AC_ARG_WITH([gobject-leak-tracker], AS_HELP_STRING([--with-gobject-leak-tracker], [track remaining GObject instances at exit (imply --enable-debug and GLib support) [default=no]]), [], [with_gobject_leak_tracker=no]) -AC_ARG_WITH(desktop-dir, +AC_ARG_WITH([desktop-dir], AS_HELP_STRING([--with-desktop-dir=PATH], [specify to destination of desktop files (default=PREFIX/share)])) -AC_ARG_WITH(local-resources, +AC_ARG_WITH([local-resources], AS_HELP_STRING([--with-local-resources], [define if built components located in the sources are used at runtime [default=no]]), [with_local_resources=yes], [with_local_resources=no]) + +AM_CONDITIONAL([BUILD_PYTHON_PACKAGE], [test "x$build_python_package" = "xyes"]) + +AM_CONDITIONAL([BUILD_DISCARD_LOCAL], [test "x$with_local_resources" = "xno"]) + + +#-- Delete all kinds of runtime library paths? + +if test "x$enable_rpath" = "xno"; then + hardcode_into_libs=no +fi + + #--- Small enumerations CFLAGS="$CFLAGS -fshort-enums -D_LARGEFILE64_SOURCE" + #--- Is debug mode needed ? if test "x$with_gobject_leak_tracker" = "xyes"; then @@ -252,20 +275,25 @@ if test "x$with_gobject_leak_tracker" = "xyes"; then [Define to 1 to enable code for dumping remaining GObject instances at exit.]) fi + #--- Discard local sources when looking for resources ? -if test "x$enable_rpath" = "xno"; then - hardcode_libdir_flag_spec= +if test "x$build_python_package" = "xyes"; then + CFLAGS="$CFLAGS -DPYTHON_PACKAGE" fi +AC_SUBST(CFLAGS) + + +#--- Discard local sources when looking for resources ? + if test "x$with_local_resources" = "xno"; then CFLAGS="$CFLAGS -DDISCARD_LOCAL" fi -AM_CONDITIONAL([BUILD_DISCARD_LOCAL], [test "x$with_local_resources" = "xno"]) - AC_SUBST(CFLAGS) + #--- Custom destination for desktop resources ? if test "x$with_desktop_dir" != x; then @@ -369,10 +397,6 @@ AC_SUBST(LIBSSL_LIBS) #--- Checks for Python -AC_ARG_ENABLE([python-bindings], - AS_HELP_STRING([--disable-python-bindings], [disable Python bindings [default=no]]), - [], [enable_python_bindings=yes]) - if test "x$enable_debug" = "xyes"; then AC_CHECK_PROG(python3_cfg_binary, [python3-dbg-config] , yes) else @@ -613,9 +637,29 @@ echo echo Found lexical analyzer generator............. : $LEX_INST echo Found general-purpose parser generator....... : $YACC_INST +if test "x$enable_python_bindings" = "xyes"; then + disable_python_bindings="no" +else + disable_python_bindings="yes" +fi + echo echo Print debugging messages..................... : $enable_debug echo Consider local resources..................... : $with_local_resources +echo Disable Python bindings...................... : $disable_python_bindings +echo Build a Python binary distribution........... : $build_python_package + +if test "$disable_python_bindings" = "yes" -a "x$build_python_package" = "xyes"; then + + echo + + m4_define([python_target_warning],[m4_joinall([m4_newline([])], + [Lack of consistency detected as a proper Python package can not get built without Python bindings.], + [Please fix the arguments provided to the configure script.])]) + + AC_MSG_WARN([python_target_warning]) + +fi if test -z "$LEX_INST" -o -z "$YACC_INST"; then |