Skip to content

Commit

Permalink
Use system libini.h if available
Browse files Browse the repository at this point in the history
  • Loading branch information
smurfix committed Dec 17, 2024
1 parent bf5d2ed commit 292ba9c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ AC_CHECK_HEADER(linux/usbdevice_fs.h,[AC_DEFINE(OS_LINUX, 1, [Linux usb availabl
AC_CHECK_HEADER(iphlpapi.h,[AC_DEFINE(HAVE_WINDOWS_IPHELPER, 1,[Windows IPHelper available])
LIBS="-liphlpapi $LIBS"; have_source_info=yes],[],[])

AC_CHECK_HEADER(ini.h,[AC_DEFINE(HAVE_LIBINIH, 1,[libinih available]) have_inih=yes],[],[])
AM_CONDITIONAL(HAVE_INIH, test x$have_inih = xyes)

AC_CHECK_DECL(SA_SIZE,[AC_DEFINE(HAVE_SA_SIZE, 1,[SA_SIZE function available])],[],[
#include <stdint.h>
#include <sys/socket.h>
Expand Down
6 changes: 5 additions & 1 deletion src/common/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
noinst_HEADERS=types.h callbacks.h
noinst_LIBRARIES=libcommon.a
libcommon_a_SOURCES=loadctl.h image.cpp image.h loadimage.h loadimage.cpp \
iobuf.cpp inih.h inih.c inifile.h inifile.cpp
iobuf.cpp inifile.h inifile.cpp
if HAVE_INIH
else
libcommon_a_SOURCES+=inih.h inih.c
endif

dist_include_HEADERS=eibloadresult.h
5 changes: 5 additions & 0 deletions src/server/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ knxd_args_DEPENDENCIES=../common/libcommon.a
knxd_args_LDADD=../common/libcommon.a
knxd_SOURCES=knxd.cpp
knxd_args_SOURCES=knxd_args.cpp

if HAVE_INIH
knxd_LDADD+=-linih
knxd_args_LDADD+=-linih
endif

0 comments on commit 292ba9c

Please sign in to comment.