Add support to build using Hombrew on Mac OS X

This commit is contained in:
Alexis Hildebrandt 2014-06-22 15:10:54 +02:00
parent a483e23e94
commit 8260f53c65
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ OBJS= calmwm.o screen.o xmalloc.o client.o menu.o \
CPPFLAGS+= `pkg-config --cflags fontconfig x11 xft xinerama xrandr`
CFLAGS?= -Wall -O2 -g -D_GNU_SOURCE
CFLAGS+= `[ "\`uname -s\`" = "Darwin" ] && echo "-DHAVE_STRLCPY -DHAVE_STRLCAT"`
LDFLAGS+= `pkg-config --libs fontconfig x11 xft xinerama xrandr`

View File

@ -24,8 +24,12 @@
/* prototypes for portable-included functions */
char *fgetln(FILE *, size_t *);
long long strtonum(const char *, long long, long long, const char **);
#ifndef HAVE_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat(char *, const char *, size_t);
#endif
#include <X11/XKBlib.h>
#include <X11/Xatom.h>