Index: src/Makefile
--- src/Makefile.orig	2013-09-30 17:51:00.000000000 +0200
+++ src/Makefile	2016-02-27 10:30:36.772589215 +0100
@@ -55,7 +55,7 @@
 # we need UCL and zlib - you can set envvar UPX_UCLDIR
 ifneq ($(wildcard $(UPX_UCLDIR)/include/ucl/ucl.h),)
 INCLUDES += -I$(UPX_UCLDIR)/include
-LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
+LIBS += -L$(UPX_UCLDIR)/lib
 endif
 LIBS += -lucl -lz
 # you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK
Index: src/miniacc.h
--- src/miniacc.h.orig	2013-09-30 17:51:00.000000000 +0200
+++ src/miniacc.h	2016-02-27 10:30:36.772589215 +0100
@@ -485,7 +485,7 @@
 #  if defined(_AIX) || defined(__AIX__) || defined(__aix__)
 #    define ACC_OS_POSIX_AIX        1
 #    define ACC_INFO_OS_POSIX       "aix"
-#  elif defined(__FreeBSD__)
+#  elif defined(__FreeBSD__) || defined(__DragonFly__)
 #    define ACC_OS_POSIX_FREEBSD    1
 #    define ACC_INFO_OS_POSIX       "freebsd"
 #  elif defined(__hpux__) || defined(__hpux)
@@ -1968,7 +1968,7 @@
 #elif !(ACC_ABI_BIG_ENDIAN) && !(ACC_ABI_LITTLE_ENDIAN)
 #if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
 #  define ACC_ABI_BIG_ENDIAN        1
-#elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64)
+#elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_POSIX_FREEBSD || ACC_OS_WIN64)
 #  define ACC_ABI_LITTLE_ENDIAN     1
 #elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430)
 #  define ACC_ABI_LITTLE_ENDIAN     1
Index: src/packer.h
--- src/packer.h.orig	2013-09-30 17:51:00.000000000 +0200
+++ src/packer.h	2016-02-27 10:30:36.772589215 +0100
@@ -238,7 +238,7 @@
     void addLoader(C,C,C,C,C,C,C,C); void addLoader(C,C,C,C,C,C,C,C,C);
     void addLoader(C,C,C,C,C,C,C,C,C,C);
 #undef C
-#if 1 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
+#if 0 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
     void __acc_cdecl_va addLoaderVA(const char *s, ...) __attribute__((__sentinel__));
 #else
     void __acc_cdecl_va addLoaderVA(const char *s, ...);
