xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 7b5903f62b681157b8e8e897f4d0ed67d27567bd

Autotools: getting rid of PKG_CHECK_MODULES as it's considered harmful
Author: Martin Dvorak
Author date (UTC): 2017-04-11 19:26
Committer name: Martin Dvorak
Committer date (UTC): 2017-04-11 19:26
Parent(s): 9410a8d693a8061d59b0dc6d3a16bf2535b0c9b5
Signing key:
Tree: f4f788e4d1e72a45529ddb5b0a702ce7f47b8ebe
File Lines added Lines deleted
configure.ac 35 22
File configure.ac changed (mode: 100644) (index d20ee51..bbd33e3)
1 1 # configure.ac Autoconf configuration file # configure.ac Autoconf configuration file
2 2 # process this file with autoconf to produce a configure script # process this file with autoconf to produce a configure script
3 3 # #
4 # Copyright (C) 2014 Martin Dvorak <martin.dvorak@mindforger.com>
4 # Copyright (C) 2014-2017 Martin Dvorak <martin.dvorak@mindforger.com>
5 5 # #
6 6 # Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
7 7 # you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
 
... ... AM_INIT_AUTOMAKE
29 29 # Checks for programs. # Checks for programs.
30 30 AC_PROG_CC AC_PROG_CC
31 31
32 # Determine OS for NCURSES check
32 # NCURSES check w/o PKG_CHECK_MODULES macro
33 # Determine OS
33 34 AC_CANONICAL_HOST AC_CANONICAL_HOST
34 # Platform specific ncurses check: if NCURSES not found, then look for ncurses
35 AC_MSG_NOTICE([IMPORTANT: Make sure you have pkg-tools installed - it's needed to run this script])
36 PKG_CHECK_MODULES([NCURSES], [ncursesw],
37 [AC_MSG_NOTICE([Module ncursesw found])],
38 [PKG_CHECK_MODULES([NCURSES], [ncurses],
39 [AC_MSG_NOTICE([Module ncurses found])],
40 [AS_CASE([$host_os],
41 [darwin*],
42 [
43 AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
44 AC_CHECK_HEADER(curses.h)
45 ],
46 [
47 AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
48 AC_CHECK_HEADER(ncursesw/curses.h)
49 ])
50 ]
51 )
52 ]
53 )
35 # Notify user that pkg-tools are required
36 AC_MSG_NOTICE([===================================================================================])
37 AC_MSG_NOTICE([IMPORTANT: Make sure you have pkg-config installed - it's needed to run this script])
38 AC_MSG_NOTICE([===================================================================================])
39 # PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed
40 AC_SUBST([NCURSESW_CFLAGS])
41 AC_SUBST([NCURSESW_LIBS])
42 if pkg-config --exists ncursesw
43 then
44 AC_MSG_NOTICE([Module ncursesw found])
45 NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
46 NCURSESW_LIBS=`pkg-config --libs ncursesw`
47 else
48 if pkg-config --exists ncurses
49 then
50 AC_MSG_NOTICE([Module ncurses found])
51 NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
52 NCURSESW_LIBS=`pkg-config --libs ncurses`
53 else
54 AS_CASE([$host_os],
55 [darwin*],
56 [
57 AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
58 AC_CHECK_HEADER(curses.h)
59 ],
60 [
61 AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
62 AC_CHECK_HEADER(ncursesw/curses.h)
63 ]
64 )
65 fi
66 fi
54 67
55 68 # Checks for libraries. # Checks for libraries.
56 69 AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])]) AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])])
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master