diff --git a/src/Makefile b/src/Makefile index dfcf7a34..8aed1900 100644 --- a/src/Makefile +++ b/src/Makefile @@ -40,7 +40,7 @@ LIBS += -lucl -lz # you should set envvar UPX_LZMADIR to point to your unpacked lzma443.tar.bz2 ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip),) DEFS += -DWITH_LZMA -INCLUDES += -I$(LZMADIR) +INCLUDES += -I$(UPX_LZMADIR) endif upx_SOURCES := $(wildcard $(srcdir)/*.cpp) diff --git a/src/conf.h b/src/conf.h index 8953fbae..a5d13a89 100644 --- a/src/conf.h +++ b/src/conf.h @@ -144,12 +144,17 @@ # undef __unix #endif -#if 1 && !defined(WITH_LZMA) -# define WITH_LZMA 1 -#endif #if !defined(WITH_UCL) # define WITH_UCL 1 #endif +#if 0 && !defined(WITH_LZMA) +# define WITH_LZMA 1 +#endif +#if defined(UPX_OFFICIAL_BUILD) +# if !defined(WITH_LZMA) || !defined(WITH_NRV) || !defined(WITH_UCL) +# error +# endif +#endif #if defined(WITH_NRV) # include #endif