From 6de2f799eae2e3ec08a5a7242b2f700207663ed9 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sun, 6 Apr 2025 18:48:43 +0900 Subject: [PATCH] update autoconf --- configure | 35 +++++++++-------------------------- configure.ac | 10 ++++------ tool/build-windows.sh | 2 +- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/configure b/configure index 38766b5..665960a 100755 --- a/configure +++ b/configure @@ -750,9 +750,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules -with_glx -with_wgl -with_glfw +with_backend enable_dependency_tracking ' ac_precious_vars='build_alias @@ -1407,9 +1405,8 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-glx Build with GLX backend - --with-wgl Build with WGL backend - --with-glfw Build with GLFW backend + --with-backend=glx|wgl|glfw + Select backend Some influential environment variables: CC C compiler command @@ -3059,24 +3056,10 @@ fi -# Check whether --with-glx was given. -if test ${with_glx+y} +# Check whether --with-backend was given. +if test ${with_backend+y} then : - withval=$with_glx; -fi - - -# Check whether --with-wgl was given. -if test ${with_wgl+y} -then : - withval=$with_wgl; -fi - - -# Check whether --with-glfw was given. -if test ${with_glfw+y} -then : - withval=$with_glfw; + withval=$with_backend; fi @@ -5738,7 +5721,7 @@ fi NB_DRIVER=OPENGL NB_BACKEND= -if test "x$with_glx" = "xyes" +if test "x$with_backend" = "xglx" then : @@ -6018,7 +6001,7 @@ fi fi -if test "x$with_wgl" = "xyes" +if test "x$with_backend" = "xwgl" then : : @@ -6029,7 +6012,7 @@ then : fi -if test "x$with_glfw" = "xyes" +if test "x$with_backend" = "xglfw" then : diff --git a/configure.ac b/configure.ac index f6f7ad8..50657bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,7 @@ AC_INIT([NishBox], [1.0.0]) AM_INIT_AUTOMAKE([subdir-objects foreign]) -AC_ARG_WITH([glx], AS_HELP_STRING([--with-glx], [Build with GLX backend])) -AC_ARG_WITH([wgl], AS_HELP_STRING([--with-wgl], [Build with WGL backend])) -AC_ARG_WITH([glfw], AS_HELP_STRING([--with-glfw], [Build with GLFW backend])) +AC_ARG_WITH([backend], AS_HELP_STRING([--with-backend=glx|wgl|glfw], [Select backend])) AM_PROG_AR AC_PROG_RANLIB @@ -14,14 +12,14 @@ PKG_PROG_PKG_CONFIG NB_DRIVER=OPENGL NB_BACKEND= -AS_IF([test "x$with_glx" = "xyes"], [ +AS_IF([test "x$with_backend" = "xglx"], [ PKG_CHECK_MODULES([GL_MORE], [x11]) PKG_CHECK_MODULES([GL], [gl]) PKG_CHECK_MODULES([GLU], [glu]) NB_BACKEND=GLX ]) -AS_IF([test "x$with_wgl" = "xyes"], [ +AS_IF([test "x$with_backend" = "xwgl"], [ : GL_MORE_LIBS="-lgdi32" GL_LIBS="-lopengl32" @@ -29,7 +27,7 @@ AS_IF([test "x$with_wgl" = "xyes"], [ NB_BACKEND=WGL ]) -AS_IF([test "x$with_glfw" = "xyes"], [ +AS_IF([test "x$with_backend" = "xglfw"], [ PKG_CHECK_MODULES([GL], [glfw3]) PKG_CHECK_MODULES([GLU], [glu]) NB_BACKEND=GLFW diff --git a/tool/build-windows.sh b/tool/build-windows.sh index 8ddadc2..232fc20 100755 --- a/tool/build-windows.sh +++ b/tool/build-windows.sh @@ -34,5 +34,5 @@ cd .. cd .. -./configure --host=${ARCH}-w64-mingw32 --with-wgl +./configure --host=${ARCH}-w64-mingw32 --with-backend=wgl ${MAKE}