Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Build issues on Fedora 20 #22

Open
eklitzke opened this issue Dec 11, 2014 · 0 comments
Open

Build issues on Fedora 20 #22

eklitzke opened this issue Dec 11, 2014 · 0 comments

Comments

@eklitzke
Copy link
Contributor

On Fedora 20, I need this patch to get it to build:

diff --git a/configure.ac b/configure.ac
index c1d5bc3..d6aa642 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,8 @@ AC_CHECK_LIB([crypto], [EVP_MD_CTX_init])
 AC_CHECK_LIB([ev], [ev_run])
 AC_CHECK_LIB([m], [floor])
 AC_CHECK_LIB([glib-2.0], [g_hash_table_new])
+AM_PROG_CC_C_O
 PKG_CHECK_MODULES([GLIB], [glib-2.0])
+PKG_CHECK_MODULES([libev], [libev >= 4.11])
 AC_REVISION([m4_esyscmd_s([git describe --always])])
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 8d21f51..63db0fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS=-O2 -g -std=c99 -pedantic -Wall -fno-strict-aliasing -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE $(GLIB_CFLAGS)
+AM_CFLAGS=-O2 -g -std=c99 -pedantic -Wall -fno-strict-aliasing -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE $(GLIB_CFLAGS) $(libev_CFLAGS)
 AM_LDFLAGS=-lcrypto -lev -lm $(GLIB_LDFLAGS)
 bin_PROGRAMS=statsrelay stathasher
 statsrelay_SOURCES=buffer.c ketama.c log.c protocol.c tcpclient.c tcpserver.c udpserver.c stats.c validate.c main.c

The issue is that on Debian the headers to go /usr/include but on Fedora 20 they're in /usr/include/libev. The check for AM_PROG_CC_C_O is needed for older versions of autoconf.

This is all fine and well, but this change breaks Debian because Debian doesn't have a pkg-config file for libev. I don't know enough about autoconf to know how to correctly fix this so that it builds on Ubuntu, Debian, and Fedora.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant