···
hardeningDisable = [ "format" ];
39
-
-system-zlib -system-libpng -system-libjpeg
41
-
-I${xextproto}/include
42
-
${if openglSupport then "-dlopen-opengl
43
-
-L${libGLU_combined}/lib -I${libGLU_combined}/include
44
-
-L${libXmu.out}/lib -I${libXmu.dev}/include" else ""}
45
-
${if threadSupport then "-thread" else "-no-thread"}
46
-
${if xrenderSupport then "-xrender -L${libXrender.out}/lib -I${libXrender.dev}/include" else "-no-xrender"}
47
-
${if xrandrSupport then "-xrandr
48
-
-L${libXrandr.out}/lib -I${libXrandr.dev}/include
49
-
-I${randrproto}/include" else "-no-xrandr"}
50
-
${if xineramaSupport then "-xinerama -L${libXinerama.out}/lib -I${libXinerama.dev}/include" else "-no-xinerama"}
51
-
${if cursorSupport then "-L${libXcursor.out}/lib -I${libXcursor.dev}/include" else ""}
52
-
${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql" else ""}
53
-
${if xftSupport then "-xft
54
-
-L${libXft.out}/lib -I${libXft.dev}/include
55
-
-L${libXft.freetype.out}/lib -I${libXft.freetype.dev}/include
56
-
-L${libXft.fontconfig.lib}/lib -I${libXft.fontconfig.dev}/include" else "-no-xft"}
37
+
configureFlags = let
38
+
mk = cond: name: "-${stdenv.lib.optionalString (!cond) "no-"}${name}";
41
+
"-system-zlib" "-system-libpng" "-system-libjpeg"
43
+
"-I${xextproto}/include"
44
+
(mk threadSupport "thread")
45
+
(mk xrenderSupport "xrender")
46
+
(mk xrandrSupport "xrandr")
47
+
(mk xineramaSupport "xinerama")
48
+
(mk xrandrSupport "xrandr")
49
+
(mk xftSupport "xft")
50
+
] ++ stdenv.lib.optionals openglSupport [
52
+
"-L${libGLU_combined}/lib" "-I${libGLU_combined}/include"
53
+
"-L${libXmu.out}/lib" "-I${libXmu.dev}/include"
54
+
] ++ stdenv.lib.optionals xrenderSupport [
55
+
"-L${libXrender.out}/lib" "-I${libXrender.dev}/include"
56
+
] ++ stdenv.lib.optionals xrandrSupport [
57
+
"-L${libXrandr.out}/lib" "-I${libXrandr.dev}/include"
58
+
"-I${randrproto}/include"
59
+
] ++ stdenv.lib.optionals xineramaSupport [
60
+
"-L${libXinerama.out}/lib" "-I${libXinerama.dev}/include"
61
+
] ++ stdenv.lib.optionals cursorSupport [
62
+
"-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
63
+
] ++ stdenv.lib.optionals mysqlSupport [
64
+
"-qt-sql-mysql" "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql"
65
+
] ++ stdenv.lib.optionals xftSupport [
66
+
"-L${libXft.out}/lib" "-I${libXft.dev}/include"
67
+
"-L${libXft.freetype.out}/lib" "-I${libXft.freetype.dev}/include"
68
+
"-L${libXft.fontconfig.lib}/lib" "-I${libXft.fontconfig.dev}/include"
# Don't strip everything so we can get useful backtraces.