kopia lustrzana https://github.com/FreeSpacenav/spacenavd
configure: added --cfgdir= option to change the default config file path
rodzic
58bc16dd0c
commit
e2c809ee36
|
@ -45,6 +45,7 @@ X11=yes
|
|||
HOTPLUG=yes
|
||||
XINPUT=yes
|
||||
VER=`git describe --tags 2>/dev/null`
|
||||
CFGDIR=/etc
|
||||
|
||||
if [ -z "$VER" ]; then
|
||||
VER=`git rev-parse --short HEAD`
|
||||
|
@ -82,6 +83,11 @@ for arg; do
|
|||
value=`echo $arg | sed 's/--prefix=//'`
|
||||
PREFIX=${value:-$prefix}
|
||||
;;
|
||||
|
||||
--cfgdir=*)
|
||||
value=`echo $arg | sed 's/--cfgdir=//'`
|
||||
CFGDIR=${value:-$cfgdir}
|
||||
;;
|
||||
|
||||
--enable-opt)
|
||||
OPT=yes;;
|
||||
|
@ -122,6 +128,7 @@ for arg; do
|
|||
done
|
||||
|
||||
echo " prefix: $PREFIX"
|
||||
echo " config dir: $CFGDIR"
|
||||
echo " optimize for speed: $OPT"
|
||||
echo " include debugging symbols: $DBG"
|
||||
echo " x11 communication method: $X11"
|
||||
|
@ -204,8 +211,11 @@ echo >>$cfgheader
|
|||
[ -n "$HAVE_MALLOC_H" ] && echo $HAVE_MALLOC_H >>$cfgheader
|
||||
[ -n "$HAVE_XINPUT2_H" ] && echo $HAVE_XINPUT2_H >>$cfgheader
|
||||
[ -n "$HAVE_XTEST_H" ] && echo $HAVE_XTEST_H >>$cfgheader
|
||||
|
||||
echo >>$cfgheader
|
||||
|
||||
echo "#define CFGDIR \"$CFGDIR\"" >>$cfgheader
|
||||
echo >>$cfgheader
|
||||
|
||||
echo '#endif /* CONFIG_H_ */' >>$cfgheader
|
||||
|
||||
echo ''
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cfgfile.h"
|
||||
#include "logger.h"
|
||||
|
||||
#define DEF_CFGFILE "/etc/spnavrc"
|
||||
#define DEF_CFGFILE CFGDIR "/spnavrc"
|
||||
#define DEF_LOGFILE "/var/log/spnavd.log"
|
||||
|
||||
#define SOCK_NAME "/var/run/spnav.sock"
|
||||
|
|
Ładowanie…
Reference in New Issue