build: Remove "--enable-debug" configure option
Unlike C code where debugging impose the "-g" compilation flags. This debugging option only affects Guile code, so using an environment variable works better since it doesn't impose to recompile Mcron or to edit "config.scm". * configure.ac: Remove "--enable-debug" configure option. * src/mcron/config.scm.in (config-debug): Use MCRON_DEBUG environment variable to trigger the debug mode at runtime.
This commit is contained in:
		
					parent
					
						
							
								02d67e7f0e
							
						
					
				
			
			
				commit
				
					
						2b9828f303
					
				
			
		
					 2 changed files with 8 additions and 15 deletions
				
			
		
							
								
								
									
										14
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								configure.ac
									
										
									
									
									
								
							|  | @ -29,20 +29,6 @@ AC_REQUIRE_AUX_FILE([git-version-gen]) | ||||||
| AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override]) | AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override]) | ||||||
| AM_SILENT_RULES([yes])		# enables silent rules by default | AM_SILENT_RULES([yes])		# enables silent rules by default | ||||||
| 
 | 
 | ||||||
| AC_MSG_CHECKING([whether debugging is requested]) |  | ||||||
| AC_ARG_ENABLE(debug, |  | ||||||
|               AC_HELP_STRING([--enable-debug], |  | ||||||
|                              [enable debugging and traceback on error]), |  | ||||||
|               CONFIG_DEBUG=$enableval, |  | ||||||
|               CONFIG_DEBUG=no) |  | ||||||
| AC_MSG_RESULT($CONFIG_DEBUG) |  | ||||||
| if test "$CONFIG_DEBUG" = "no"; then |  | ||||||
|    CONFIG_DEBUG="#f" |  | ||||||
| else |  | ||||||
|    CONFIG_DEBUG="#t" |  | ||||||
| fi |  | ||||||
| AC_SUBST(CONFIG_DEBUG) |  | ||||||
| 
 |  | ||||||
| AC_CANONICAL_HOST | AC_CANONICAL_HOST | ||||||
| AC_PROG_AWK | AC_PROG_AWK | ||||||
| AC_PROG_EGREP | AC_PROG_EGREP | ||||||
|  |  | ||||||
|  | @ -19,7 +19,6 @@ | ||||||
| 
 | 
 | ||||||
| (define-module (mcron config)) | (define-module (mcron config)) | ||||||
| 
 | 
 | ||||||
| (define-public config-debug @CONFIG_DEBUG@) |  | ||||||
| (define-public config-package-name "@PACKAGE_NAME@") | (define-public config-package-name "@PACKAGE_NAME@") | ||||||
| (define-public config-package-version "@PACKAGE_VERSION@") | (define-public config-package-version "@PACKAGE_VERSION@") | ||||||
| (define-public config-package-string "@PACKAGE_STRING@") | (define-public config-package-string "@PACKAGE_STRING@") | ||||||
|  | @ -33,3 +32,11 @@ | ||||||
| (define-public config-deny-file "@CONFIG_DENY_FILE@") | (define-public config-deny-file "@CONFIG_DENY_FILE@") | ||||||
| (define-public config-pid-file "@CONFIG_PID_FILE@") | (define-public config-pid-file "@CONFIG_PID_FILE@") | ||||||
| (define-public config-tmp-dir "@CONFIG_TMP_DIR@") | (define-public config-tmp-dir "@CONFIG_TMP_DIR@") | ||||||
|  | 
 | ||||||
|  | ;;; | ||||||
|  | ;;; Runtime configuration | ||||||
|  | ;;; | ||||||
|  | 
 | ||||||
|  | (define-public config-debug | ||||||
|  |   ;; Trigger the display of Guile stack traces on errors. | ||||||
|  |   (getenv "MCRON_DEBUG")) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mathieu Lirzin
				Mathieu Lirzin