Browse Source

Show if libmagic is available during "make features"

tags/1.9.8
falkTX 6 years ago
parent
commit
5094196ece
3 changed files with 26 additions and 17 deletions
  1. +23
    -14
      Makefile
  2. +2
    -2
      source/Makefile.mk
  3. +1
    -1
      source/utils/CarlaBinaryUtils.hpp

+ 23
- 14
Makefile View File

@@ -722,39 +722,48 @@ endif
features_print_main:
@printf -- "$(tS)---> Main features $(tE)\n"
ifeq ($(HAVE_PYQT),true)
@printf -- "Front-End: $(ANS_YES) (Using $(FEV))\n"
@printf -- "Front-End: $(ANS_YES) (Using $(FEV))\n"
ifneq ($(WIN32),true)
@printf -- "LV2 plugin: $(ANS_YES)\n"
@printf -- "LV2 plugin: $(ANS_YES)\n"
else
@printf -- "LV2 plugin: $(ANS_NO) $(mZ)Not available for Windows$(mE)\n"
@printf -- "LV2 plugin: $(ANS_NO) $(mZ)Not available for Windows$(mE)\n"
endif
ifeq ($(LINUX),true)
ifeq ($(HAVE_X11),true)
@printf -- "VST plugin: $(ANS_YES)\n"
@printf -- "VST plugin: $(ANS_YES)\n"
else # HAVE_X11
@printf -- "VST plugin: $(ANS_NO) $(mS)X11 missing$(mE)\n"
@printf -- "VST plugin: $(ANS_NO) $(mS)X11 missing$(mE)\n"
endif
else # LINUX
@printf -- "VST plugin: $(ANS_NO) $(mZ)Linux only$(mE)\n"
@printf -- "VST plugin: $(ANS_NO) $(mZ)Linux only$(mE)\n"
endif
else
@printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n"
@printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
@printf -- "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
@printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n"
@printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
@printf -- "VST plugin: $(ANS_NO) $(mS)No front-end$(mE)\n"
endif
ifeq ($(HAVE_HYLIA),true)
@printf -- "Link support: $(ANS_YES)\n"
@printf -- "Link support: $(ANS_YES)\n"
else
ifeq ($(MACOS_OLD),true)
@printf -- "Link support: $(ANS_NO) $(mZ)MacOS >= 10.10 only$(mE)\n"
@printf -- "Link support: $(ANS_NO) $(mZ)MacOS >= 10.10 only$(mE)\n"
else
@printf -- "Link support: $(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)\n"
@printf -- "Link support: $(ANS_NO) $(mZ)Linux, MacOS and Windows only$(mE)\n"
endif
endif
ifeq ($(HAVE_LIBLO),true)
@printf -- "OSC support: $(ANS_YES)\n"
@printf -- "OSC support: $(ANS_YES)\n"
else
@printf -- "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)\n"
@printf -- "OSC support: $(ANS_NO) $(mS)Missing liblo$(mE)\n"
endif
ifeq ($(WIN32),true)
@printf -- "Binary detect: $(ANS_YES)\n"
else
ifeq ($(HAVE_LIBMAGIC),true)
@printf -- "Binary detect: $(ANS_YES)\n"
else
@printf -- "Binary detect: $(ANS_NO) $(mS)Missing libmagic/file$(mE)\n"
endif
endif
@printf -- "\n"



+ 2
- 2
source/Makefile.mk View File

@@ -238,9 +238,9 @@ HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && ech
HAVE_SNDFILE = $(shell pkg-config --exists sndfile && echo true)

# ---------------------------------------------------------------------------------------------------------------------
# Check for optional libs (special non-pkgconfig unix tests)
# Check for optional libs (special non-pkgconfig tests)

ifeq ($(UNIX),true)
ifneq ($(WIN32),true)

# libmagic doesn't have a pkg-config file, so we need to call the compiler to test it
HAVE_LIBMAGIC = $(shell echo '\#include <magic.h>' | $(CC) $(CFLAGS) -x c -w -c - -o .libmagic-tmp 2>/dev/null && echo true)


+ 1
- 1
source/utils/CarlaBinaryUtils.hpp View File

@@ -79,7 +79,7 @@ BinaryType getBinaryTypeFromFile(const char* const filename)
using water::FileInputStream;

ScopedPointer<FileInputStream> stream(File(filename).createInputStream());
CARLA_SAFE_ASSERT_RETURN(stream != nullptr || stream->failedToOpen(), BINARY_NATIVE);
CARLA_SAFE_ASSERT_RETURN(stream != nullptr && ! stream->failedToOpen(), BINARY_NATIVE);

// -------------------------------------------------------------------
// binary type code based on Ardour's dll_info function


Loading…
Cancel
Save