$(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
_snackmodule.so: snackmodule.c $(LIBNEWTSH)
- for ver in $(PYTHONVERS) ; do \
+ [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
mkdir -p $$ver ;\
PCFLAGS=`$$ver-config --cflags`; \
PIFLAGS=`$$ver-config --includes`; \
PLFLAGS=`$$ver-config --libs`; \
$(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
$(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L. -lnewt $(LIBS);\
- done
+ done || :
touch $@
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
[ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
- for ver in $(PYTHONVERS) ; do \
+ [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
[ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
- done
+ done || :
Makefile: newt.spec
echo "You need to rerun ./configure before continuing"
AC_CHECK_HEADERS([popt.h libintl.h])
AC_MSG_CHECKING([for python versions])
-PYTHONVERS=$(echo /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
-AC_MSG_RESULT([$PYTHONVERS])
+AC_ARG_WITH([python], [ --without-python do not compile python support])
+if test "x$with_python" = "xno"; then
+ AC_MSG_RESULT([skipped])
+ PYTHONVERS=
+else
+ PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
+ AC_MSG_RESULT([$PYTHONVERS])
+fi
AC_SUBST([PYTHONVERS])
AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])