configure

changeset 637
21e542c15832
parent 634
0a7dfeaf385c
child 641
000d40511c92
--- a/configure	Thu Mar 14 19:37:53 2024 +0100
+++ b/configure	Fri Mar 15 20:57:49 2024 +0100
@@ -683,6 +683,7 @@
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_wiringpi
 enable_experiment
 enable_simulator
 enable_debugging
@@ -1303,6 +1304,7 @@
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-wiringpi       Compile wiringPi code
   --enable-experiment     Compile experimental code
   --enable-simulator      Compile simulator code
   --enable-debugging      Compile for debugging
@@ -3509,7 +3511,15 @@
 fi
 
 WIRINGPI=No
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiringPiSetup in -lwiringPi" >&5
+# Check whether --enable-wiringpi was given.
+if test "${enable_wiringpi+set}" = set; then :
+  enableval=$enable_wiringpi;  wiringpi=$enableval
+else
+   wiringpi=yes
+fi
+
+if test "$wiringpi" = "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiringPiSetup in -lwiringPi" >&5
 $as_echo_n "checking for wiringPiSetup in -lwiringPi... " >&6; }
 if ${ac_cv_lib_wiringPi_wiringPiSetup+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -3551,9 +3561,9 @@
   result=no
 fi
 
-if test "$result" = "yes"; then
-  LIBS="$LIBS -lwiringPi -lwiringPiDev"
-  for ac_header in wiringPi.h
+  if test "$result" = "yes"; then
+    LIBS="$LIBS -lwiringPi -lwiringPiDev"
+    for ac_header in wiringPi.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "wiringPi.h" "ac_cv_header_wiringPi_h" "$ac_includes_default"
 if test "x$ac_cv_header_wiringPi_h" = xyes; then :
@@ -3567,6 +3577,10 @@
 
 done
 
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: check wiringPi disabled" >&5
+$as_echo "check wiringPi disabled" >&6; }
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_iter_init_default in -ljson-c" >&5
@@ -3799,29 +3813,29 @@
 SDL_CFLAGS=""
 SDL_LIBS=""
 SDL="No"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SDL library" >&5
-$as_echo_n "checking SDL library... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SDL2 library" >&5
+$as_echo_n "checking SDL2 library... " >&6; }
 pkg-config --exists sdl
 if test "$?" = "0"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sdl library v1.2.0 or newer" >&5
-$as_echo_n "checking sdl library v1.2.0 or newer... " >&6; }
-  pkg-config --atleast-version=1.2.0 sdl
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sdl2 library v2.0.0 or newer" >&5
+$as_echo_n "checking sdl2 library v2.0.0 or newer... " >&6; }
+  pkg-config --atleast-version=2.0.0 sdl2
   if test "$?" = "0"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
 $as_echo "found" >&6; }
   else
     as_fn_error $? "not found" "$LINENO" 5
   fi
-  SDL_CFLAGS="$(pkg-config --cflags sdl)"
-  SDL_LIBS="$(pkg-config --libs sdl)"
-  for ac_header in SDL/SDL.h
+  SDL_CFLAGS="$(pkg-config --cflags sdl2)"
+  SDL_LIBS="$(pkg-config --libs sdl2)"
+  for ac_header in SDL2/SDL.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default"
-if test "x$ac_cv_header_SDL_SDL_h" = xyes; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "SDL2/SDL.h" "ac_cv_header_SDL2_SDL_h" "$ac_includes_default"
+if test "x$ac_cv_header_SDL2_SDL_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_SDL_SDL_H 1
+#define HAVE_SDL2_SDL_H 1
 _ACEOF
 
 fi
@@ -3835,15 +3849,15 @@
 fi
 
 # Check for SDL_ttf
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SDL_ttf library" >&5
-$as_echo_n "checking SDL_ttf library... " >&6; }
-pkg-config --exists SDL_ttf
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SDL2_ttf library" >&5
+$as_echo_n "checking SDL2_ttf library... " >&6; }
+pkg-config --exists SDL2_ttf
 if test "$?" = "0"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sdl library v2.0.0 or newer" >&5
-$as_echo_n "checking sdl library v2.0.0 or newer... " >&6; }
-  pkg-config --atleast-version=2.0.0 SDL_ttf
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sdl2 library v2.0.0 or newer" >&5
+$as_echo_n "checking sdl2 library v2.0.0 or newer... " >&6; }
+  pkg-config --atleast-version=2.0.0 SDL2_ttf
   if test "$?" = "0"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
 $as_echo "found" >&6; }
@@ -3851,8 +3865,8 @@
     as_fn_error $? "not found" "$LINENO" 5
   fi
   # Override flags
-  SDL_CFLAGS="$(pkg-config --cflags SDL_ttf)"
-  SDL_LIBS="$(pkg-config --libs SDL_ttf)"
+  SDL_CFLAGS="$(pkg-config --cflags SDL2_ttf)"
+  SDL_LIBS="$(pkg-config --libs SDL2_ttf)"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -5258,7 +5272,7 @@
     Version : ............ ${VERSION}
     Main directory : ..... ${prefix}
     WiringPi : ........... ${WIRINGPI}
-    SDL library : ........ ${SDL}
+    SDL2 library : ....... ${SDL}
     Simulator : .......... ${SIMULATOR}
 
   Now type 'make' and 'sudo make install'
@@ -5271,7 +5285,7 @@
     Version : ............ ${VERSION}
     Main directory : ..... ${prefix}
     WiringPi : ........... ${WIRINGPI}
-    SDL library : ........ ${SDL}
+    SDL2 library : ....... ${SDL}
     Simulator : .......... ${SIMULATOR}
 
   Now type 'make' and 'sudo make install'

mercurial