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

New "configure" ncurses detection code #1512

Merged
merged 10 commits into from
Sep 20, 2024
Merged

Commits on Sep 18, 2024

  1. build: always call PKG_PROG_PKG_CONFIG in configure

    pkg-config will be used for detecting 'curses' library in a future
    commit. We have been using pkg-config for detecting multiple libraries
    ('hwloc' and formerly 'libnl'), thus the PKG_PROG_PKG_CONFIG macro
    should be called early.
    
    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    7e940dd View commit details
    Browse the repository at this point in the history
  2. build: bring back configure warning when pkg.m4 is absent

    Commit 24b1513 removed the warning
    when the configure script is generated without pkg.m4. I added that
    warning years ago (see 103f1a4) to
    prevent downstream distributions from creating a tarball with an
    "incomplete" configure script. Add the warning back, reword the
    messages to tell exactly what feature would be missing (to builders),
    and also add FORCE_MAKE_DIST variable for builders who want to ignore
    the warning. :)
    
    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    fa2ff5f View commit details
    Browse the repository at this point in the history
  3. CI: Install pkg-config for FreeBSD build

    This allows configure to be generated with pkg.m4 in FreeBSD build job.
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    078c26b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a1ebd4 View commit details
    Browse the repository at this point in the history
  5. Replace tab indent with spaces in configure

    Code style fix.
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    4c637f2 View commit details
    Browse the repository at this point in the history
  6. build: Rewrite curses detection code in configure

    The new curses library detection code in configure script
    * Uses pkg-config for detecting CFLAGS and LIBS for curses library,
      falls back to 'ncurses*-config' if pkg-config is not available, and
      falls back to "-l${library}" if both fail.
    * Supports override of compiling flags and linking flags through
      CURSES_CFLAGS and CURSES_LIBS variables.
    * Supports '--with-curses=library' option to manually specify the curses
      library name.
    
    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    99fdd80 View commit details
    Browse the repository at this point in the history
  7. build: Improve "-ltinfo" detection in configure

    Since "-lncurses" might require explicit "-ltinfo" flag to link
    (especially for static libncurses without libtool or pkg-config),
    "-ltinfo" needs to be checked alongside "-lncurses" and not after it.
    
    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    c673539 View commit details
    Browse the repository at this point in the history
  8. build: Add friendly warning to advise user to install pkg-config

    If we can detect the presence of '*curses*.pc' files in some
    pkg-config default search directories, print a warning message.
    
    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    0fdf42c View commit details
    Browse the repository at this point in the history
  9. CI: Don't override LDFLAGS for NetBSD build

    Let configure detect ncurses if possible
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    27c51aa View commit details
    Browse the repository at this point in the history
  10. doc: Update netbsd/README regarding curses support

    Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
    Explorer09 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d3c337b View commit details
    Browse the repository at this point in the history