xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 2f49c01fc563fdbdce6ca7fb37408230c8a9827c

Added --with-gtk and --with-libmagic configure script options.
Author: xaizek
Author date (UTC): 2011-05-28 09:06
Committer name: xaizek
Committer date (UTC): 2011-05-28 09:06
Parent(s): bbc50afca3c905d98aa551caa66f1d09897a7a59
Signing key:
Tree: 9cd3d151692b01c91c89366609f1e97620aa5f87
File Lines added Lines deleted
configure 33 4
configure.in 31 7
File configure changed (mode: 100755) (index c7672e7f8..5eef43bd3)
... ... with_sysroot
733 733 enable_libtool_lock enable_libtool_lock
734 734 enable_largefile enable_largefile
735 735 with_curses with_curses
736 with_gtk
737 with_libmagic
736 738 enable_extended_keys enable_extended_keys
737 739 enable_compatibility_mode enable_compatibility_mode
738 740 ' '
 
... ... Optional Packages:
1387 1389 --with-sysroot=DIR Search for dependent libraries within DIR --with-sysroot=DIR Search for dependent libraries within DIR
1388 1390 (or the compiler's sysroot if not specified). (or the compiler's sysroot if not specified).
1389 1391 --with-curses=DIR where ncurses is installed --with-curses=DIR where ncurses is installed
1392 --with-gtk use GTK+ to determine mimetypes if available
1393 [default=yes]
1394 --with-libmagic use libmagic to determine mimetypes if available
1395 [default=yes]
1390 1396
1391 1397 Some influential environment variables: Some influential environment variables:
1392 1398 CC C compiler command CC C compiler command
 
... ... fi
13108 13114 LIBS=$LIBS $GUI_LINK_OPTS_TERM LIBS=$LIBS $GUI_LINK_OPTS_TERM
13109 13115
13110 13116
13111 if pkg-config --exists glib-2.0 gtk+-2.0; then
13112 CFLAGS="$CFLAGS $(pkg-config --cflags glib-2.0 gtk+-2.0)"
13113 LIBS="$LIBS $(pkg-config --libs glib-2.0 gtk+-2.0)"
13117
13118 # Check whether --with-gtk was given.
13119 if test "${with_gtk+set}" = set; then :
13120 withval=$with_gtk; use_gtk=$withval
13121 else
13122 use_gtk=yes
13123 fi
13124
13125
13126
13127 # Check whether --with-libmagic was given.
13128 if test "${with_libmagic+set}" = set; then :
13129 withval=$with_libmagic; use_libmagic=$withval
13130 else
13131 use_libmagic=yes
13132 fi
13133
13134
13135
13136 if test "$use_gtk" = "yes"; then
13137 if pkg-config --exists glib-2.0 gtk+-2.0; then
13138 CFLAGS="$CFLAGS $(pkg-config --cflags glib-2.0 gtk+-2.0)"
13139 LIBS="$LIBS $(pkg-config --libs glib-2.0 gtk+-2.0)"
13114 13140
13115 13141 $as_echo "#define HAVE_LIBGTK 1" >>confdefs.h $as_echo "#define HAVE_LIBGTK 1" >>confdefs.h
13116 13142
13143 fi
13117 13144 fi fi
13118 13145
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5
13146 if test "$use_libmagic" = "yes"; then
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5
13120 13148 $as_echo_n "checking for magic_open in -lmagic... " >&6; } $as_echo_n "checking for magic_open in -lmagic... " >&6; }
13121 13149 if ${ac_cv_lib_magic_magic_open+:} false; then : if ${ac_cv_lib_magic_magic_open+:} false; then :
13122 13150 $as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
 
... ... _ACEOF
13161 13189
13162 13190 fi fi
13163 13191
13192 fi
13164 13193
13165 13194
13166 13195 # Check whether --enable-extended_keys was given. # Check whether --enable-extended_keys was given.
File configure.in changed (mode: 100644) (index 74407b592..0c16581e2)
... ... AC_CHECK_LIB(ncursesw, initscr,
71 71 ]) ])
72 72 LIBS=$LIBS $GUI_LINK_OPTS_TERM LIBS=$LIBS $GUI_LINK_OPTS_TERM
73 73
74 dnl checks for mime type detection
75
76 if pkg-config --exists glib-2.0 gtk+-2.0; then
77 CFLAGS="$CFLAGS $(pkg-config --cflags glib-2.0 gtk+-2.0)"
78 LIBS="$LIBS $(pkg-config --libs glib-2.0 gtk+-2.0)"
79 AC_DEFINE([HAVE_LIBGTK], [1], [use gtk to determine mime type])
74 dnl ----------------------------------------------------------------------------
75 dnl checks for external libraries
76 dnl ----------------------------------------------------------------------------
77
78 AC_ARG_WITH(gtk,
79 AS_HELP_STRING([--with-gtk],
80 [use GTK+ to determine mimetypes if available @<:@default=yes@:>@]),
81 [use_gtk=$withval],
82 [use_gtk=yes])
83
84 AC_ARG_WITH(libmagic,
85 AS_HELP_STRING([--with-libmagic],
86 [use libmagic to determine mimetypes if available @<:@default=yes@:>@]),
87 [use_libmagic=$withval],
88 [use_libmagic=yes])
89
90 dnl ----------------------------------------------------------------------------
91 dnl checks for mimetype detection
92 dnl ----------------------------------------------------------------------------
93
94 if test "$use_gtk" = "yes"; then
95 if pkg-config --exists glib-2.0 gtk+-2.0; then
96 CFLAGS="$CFLAGS $(pkg-config --cflags glib-2.0 gtk+-2.0)"
97 LIBS="$LIBS $(pkg-config --libs glib-2.0 gtk+-2.0)"
98 AC_DEFINE([HAVE_LIBGTK], [1], [use gtk to determine mime type])
99 fi
80 100 fi fi
81 101
82 AC_CHECK_LIB(magic, magic_open)
102 if test "$use_libmagic" = "yes"; then
103 AC_CHECK_LIB(magic, magic_open)
104 fi
83 105
106 dnl ----------------------------------------------------------------------------
84 107 dnl handle options dnl handle options
108 dnl ----------------------------------------------------------------------------
85 109
86 110 AC_ARG_ENABLE(extended_keys, AC_ARG_ENABLE(extended_keys,
87 111 AS_HELP_STRING( AS_HELP_STRING(
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/vifm

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

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