mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-10-29 05:40:23 -04:00 
			
		
		
		
	build-sys: Use AX_DEFINE_DIR macro instead of setting AM_CFLAGS
This makes the compiler command line a bit shorter, useful for compiling with make V=1.
This commit is contained in:
		
							parent
							
								
									7eba9d92f7
								
							
						
					
					
						commit
						08631831cb
					
				
					 3 changed files with 58 additions and 10 deletions
				
			
		
							
								
								
									
										13
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								configure.ac
									
										
									
									
									
								
							|  | @ -99,7 +99,7 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) | |||
| AM_GLIB_GNU_GETTEXT | ||||
| 
 | ||||
| pulselocaledir='${prefix}/${DATADIRNAME}/locale' | ||||
| AC_SUBST(pulselocaledir) | ||||
| AX_DEFINE_DIR(PULSE_LOCALEDIR, pulselocaledir, [Gettext locale dir]) | ||||
| 
 | ||||
| 
 | ||||
| #### Determine host OS #### | ||||
|  | @ -966,6 +966,9 @@ AC_SUBST(DBUS_LIBS) | |||
| AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1]) | ||||
| AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.])) | ||||
| 
 | ||||
| PA_MACHINE_ID="${localstatedir}/lib/dbus/machine-id" | ||||
| AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file]) | ||||
| 
 | ||||
| # HAL and BlueZ depend on D-Bus: So double check if they were explicitly enabled. | ||||
| if test "x$HAVE_DBUS" != "x1" ; then | ||||
|     HAVE_HAL=0 | ||||
|  | @ -1086,11 +1089,11 @@ fi | |||
| #### PulseAudio system runtime dir #### | ||||
| 
 | ||||
| PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse" | ||||
| AC_SUBST(PA_SYSTEM_RUNTIME_PATH) | ||||
| AX_DEFINE_DIR(PA_SYSTEM_RUNTIME_PATH, PA_SYSTEM_RUNTIME_PATH, [System runtime dir]) | ||||
| PA_SYSTEM_CONFIG_PATH="${localstatedir}/lib/pulse" | ||||
| AC_SUBST(PA_SYSTEM_CONFIG_PATH) | ||||
| AX_DEFINE_DIR(PA_SYSTEM_CONFIG_PATH, PA_SYSTEM_CONFIG_PATH, [System config dir]) | ||||
| PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse" | ||||
| AC_SUBST(PA_SYSTEM_STATE_PATH) | ||||
| AX_DEFINE_DIR(PA_SYSTEM_STATE_PATH, PA_SYSTEM_STATE_PATH, [System state dir]) | ||||
| 
 | ||||
| #### Mac OSX specific stuff ##### | ||||
| 
 | ||||
|  | @ -1166,6 +1169,7 @@ AC_ARG_WITH( | |||
|         [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules"]) | ||||
| 
 | ||||
| AC_SUBST(modlibexecdir) | ||||
| AX_DEFINE_DIR(PA_DLSEARCHPATH, modlibexecdir, [Modules dir]) | ||||
| 
 | ||||
| AC_ARG_WITH( | ||||
|         [udev-rules-dir], | ||||
|  | @ -1240,6 +1244,7 @@ echo " | |||
|     prefix:                        ${prefix} | ||||
|     sysconfdir:                    ${sysconfdir} | ||||
|     localstatedir:                 ${localstatedir} | ||||
|     modlibexecdir:                 ${modlibexecdir} | ||||
|     System Runtime Path:           ${PA_SYSTEM_RUNTIME_PATH} | ||||
|     System State Path:             ${PA_SYSTEM_STATE_PATH} | ||||
|     System Config Path:            ${PA_SYSTEM_CONFIG_PATH} | ||||
|  |  | |||
							
								
								
									
										49
									
								
								m4/ax_define_dir.m4
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								m4/ax_define_dir.m4
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,49 @@ | |||
| # =========================================================================== | ||||
| #       http://www.gnu.org/software/autoconf-archive/ax_define_dir.html | ||||
| # =========================================================================== | ||||
| # | ||||
| # SYNOPSIS | ||||
| # | ||||
| #   AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) | ||||
| # | ||||
| # DESCRIPTION | ||||
| # | ||||
| #   This macro sets VARNAME to the expansion of the DIR variable, taking | ||||
| #   care of fixing up ${prefix} and such. | ||||
| # | ||||
| #   VARNAME is then offered as both an output variable and a C preprocessor | ||||
| #   symbol. | ||||
| # | ||||
| #   Example: | ||||
| # | ||||
| #     AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) | ||||
| # | ||||
| # LICENSE | ||||
| # | ||||
| #   Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz> | ||||
| #   Copyright (c) 2008 Andreas Schwab <schwab@suse.de> | ||||
| #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | ||||
| #   Copyright (c) 2008 Alexandre Oliva | ||||
| # | ||||
| #   Copying and distribution of this file, with or without modification, are | ||||
| #   permitted in any medium without royalty provided the copyright notice | ||||
| #   and this notice are preserved. This file is offered as-is, without any | ||||
| #   warranty. | ||||
| 
 | ||||
| #serial 6 | ||||
| 
 | ||||
| AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) | ||||
| AC_DEFUN([AX_DEFINE_DIR], [ | ||||
|   prefix_NONE= | ||||
|   exec_prefix_NONE= | ||||
|   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix | ||||
|   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix | ||||
| dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn | ||||
| dnl refers to ${prefix}.  Thus we have to use `eval' twice. | ||||
|   eval ax_define_dir="\"[$]$2\"" | ||||
|   eval ax_define_dir="\"$ax_define_dir\"" | ||||
|   AC_SUBST($1, "$ax_define_dir") | ||||
|   AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) | ||||
|   test "$prefix_NONE" && prefix=NONE | ||||
|   test "$exec_prefix_NONE" && exec_prefix=NONE | ||||
| ]) | ||||
|  | @ -55,15 +55,9 @@ AM_CFLAGS = \ | |||
| 	-I$(top_builddir)/src/modules \ | ||||
| 	$(PTHREAD_CFLAGS) -D_POSIX_PTHREAD_SEMANTICS \ | ||||
| 	-DPA_BUILDDIR=\"$(abs_builddir)\" \ | ||||
| 	-DPA_DLSEARCHPATH=\"$(modlibexecdir)\" \ | ||||
| 	-DPA_DEFAULT_CONFIG_DIR=\"$(PA_DEFAULT_CONFIG_DIR)\" \ | ||||
| 	-DPA_BINARY=\"$(PA_BINARY)\" \ | ||||
| 	-DPA_SYSTEM_RUNTIME_PATH=\"$(PA_SYSTEM_RUNTIME_PATH)\" \ | ||||
| 	-DPA_SYSTEM_CONFIG_PATH=\"$(PA_SYSTEM_CONFIG_PATH)\" \ | ||||
| 	-DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \ | ||||
| 	-DAO_REQUIRE_CAS \ | ||||
| 	-DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \ | ||||
| 	-DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \ | ||||
| 	-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \ | ||||
| 	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Maarten Bosmans
						Maarten Bosmans