diff --git a/Makefile b/Makefile index 7777d418d6..02c4e9a6b5 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ ifeq ($(HAVE_AL), 1) LIBS += -lopenal endif -ifeq ($(HAVE_OPENGL), 1) +ifeq ($(HAVE_GLFW), 1) OBJ += gfx/gl.o LIBS += -lglfw endif diff --git a/driver.c b/driver.c index 425519fd92..c1d451906f 100644 --- a/driver.c +++ b/driver.c @@ -21,6 +21,7 @@ #include #include #include "hqflt/filters.h" +#include "config.h" static const audio_driver_t *audio_drivers[] = { #ifdef HAVE_ALSA @@ -41,7 +42,7 @@ static const audio_driver_t *audio_drivers[] = { }; static const video_driver_t *video_drivers[] = { -#ifdef HAVE_GL +#ifdef HAVE_GLFW &video_gl, #endif }; diff --git a/hqflt/filters.h b/hqflt/filters.h index e375b09f41..439b3f3727 100644 --- a/hqflt/filters.h +++ b/hqflt/filters.h @@ -19,6 +19,8 @@ #ifndef __FILTERS_H #define __FILTERS_H +#include "config.h" + #ifdef HAVE_FILTER #include "pastlib.h" diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 5277aee880..5dd6cf36f2 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -16,10 +16,12 @@ check_lib ROAR -lroar roar_vs_new check_lib GLFW -lglfw glfwInit check_critical GLFW "Cannot find GLFW library." +check_lib CG -lCg cgCreateContext + check_lib SRC -lsamplerate src_callback_new # Creates config.mk. -VARS="ALSA OSS AL RSOUND ROAR GLFW FILTERS" +VARS="ALSA OSS AL RSOUND ROAR GLFW FILTER CG" create_config_make config.mk $VARS create_config_header config.h $VARS diff --git a/qb/config.params.sh b/qb/config.params.sh index e3c8e271ac..768550b26b 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -8,7 +8,7 @@ PACKAGE_VERSION=0.1 # $2: Comment # $3: Default arg. auto implies that HAVE_ALSA will be set according to library checks later on. add_command_line_string LIBSNES "libsnes library used" "-lsnes" -add_command_line_enable FILTERS "Disable CPU filter support" yes +add_command_line_enable FILTER "Disable CPU filter support" yes add_command_line_enable CG "Enable CG shader support" auto add_command_line_enable ALSA "Enable ALSA support" auto add_command_line_enable OSS "Enable OSS support" auto diff --git a/qb/qb.libs.sh b/qb/qb.libs.sh index 30a13f2219..ab8585fc83 100644 --- a/qb/qb.libs.sh +++ b/qb/qb.libs.sh @@ -277,9 +277,9 @@ create_config_make() do tmpval="HAVE_$1" eval tmpval=\$$tmpval - if [ $tmpval = yes ]; then + if [ "$tmpval" = yes ]; then echo "HAVE_$1 = 1" >> "$outfile" - elif [ $tmpval = no ]; then + elif [ "$tmpval" = no ]; then echo "HAVE_$1 = 0" >> "$outfile" fi diff --git a/settings.c b/settings.c index b131d24381..26c85ca736 100644 --- a/settings.c +++ b/settings.c @@ -21,6 +21,7 @@ #include #include #include "hqflt/filters.h" +#include "config.h" struct settings g_settings;