Commit 4567042b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add Makefile flag to disable version sorting on C libraries without strverscmp

parent b251f262
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ Available flags are:
| exif | 0 | Builtin EXIF tag display support |
| help | 0 | include help text (refers to the manpage otherwise) |
| stat64 | 0 | Support CIFS shares from 64bit hosts on 32bit machines |
| verscmp | 1 | Support naturing sorting (`--version-sort`). Requires a GNU-compatible libc exposing `strverscmp` |
| xinerama | 1 | Support Xinerama/XRandR multiscreen setups |

So, by default **libcurl** and **Xinerama** are enabled, the rest is disabled.
+9 −1
Original line number Diff line number Diff line
@@ -5,9 +5,10 @@ app ?= 0
cam ?= 0
curl ?= 1
debug ?= 0
exif ?= 0
help ?= 0
verscmp ?= 1
xinerama ?= 1
exif ?= 0

# Prefix for all installed files
PREFIX ?= /usr/local
@@ -63,6 +64,13 @@ ifeq (${stat64},1)
	CFLAGS += -D_FILE_OFFSET_BITS=64
endif

ifeq (${verscmp},1)
	CFLAGS += -DHAVE_VERSCMP
	MAN_VERSCMP = enabled
else
	MAN_VERSCMP = disabled
endif

ifeq (${xinerama},1)
	CFLAGS += -DHAVE_LIBXINERAMA
	LDLIBS += -lXinerama
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ all: ${TARGETS}
	-e 's/\$$MAN_CURL\$$/${MAN_CURL}/' \
	-e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \
	-e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \
	-e 's/\$$MAN_VERSCMP\$$/${MAN_VERSCMP}/' \
	-e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
	< ${@:.1=.pre} > $@

+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ $VERSION$
.
.Pp
.
Compile-time switches: libcurl support $MAN_CURL$, Xinerama support
Compile-time switches: libcurl support $MAN_CURL$, natural sorting support
$MAN_VERSCMP$, Xinerama support
$MAN_XINERAMA$, builtin EXIF support $MAN_EXIF$$MAN_DEBUG$
.
.
+7 −0
Original line number Diff line number Diff line
@@ -27,7 +27,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef FEH_H
#define FEH_H

/*
 * strverscmp(3) is a GNU extension. In most supporting C libraries it
 * requires _GNU_SOURCE to be defined.
 */
#ifdef HAVE_VERSCMP
#define _GNU_SOURCE
#endif

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
Loading