AC_ARG_ENABLE(${short}, AC_HELP_STRING([--enable-${short}],
[enable ${name} support [default=yes]]),
[HW_${upper}="$enableval"],
- [HW_${upper}=yes])
+ [HW_${upper}=$HW_ENABLED_DEFAULT])
AM_CONDITIONAL(HW_${upper}, test x$HW_${upper} = xyes)
if test "x$HW_${upper}" = "xyes"; then
AC_DEFINE(HAVE_HW_${upper}, 1, [${name} support])
# add summary line
out = ''
state = 'copy'
- names['summary'] = "%s%s $HW_%s" % (names['name'],
+ names['summary'] = "%s%s $HW_%s" % (names['short'],
'.' * (32 - len(names['name'])), names['upper'])
for line in configure_ac.split('\n')[:-1]:
if state == 'copy':
#
scriptdir = os.getcwd()
-if socket.gethostname() == 'sigrok':
- LIBSR = '/data/git/libsigrok'
- TMPLDIR = '/data/tools/tmpl'
-else:
- LIBSR = 'git://sigrok.org/libsigrok'
- TMPLDIR = scriptdir
+if scriptdir.split('/')[-2:] != ['sigrok-util', 'source']:
+ print("Please call this script from the 'source' directory.")
+ sys.exit(1)
+
+LIBSR = 'git://sigrok.org/libsigrok'
+TMPLDIR = scriptdir
if len(sys.argv) < 2:
print("Usage: new-driver <name>")