]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2005-06-01 12:46:31 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 1 Jun 2005 12:46:32 +0000 (12:46 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 1 Jun 2005 12:46:32 +0000 (12:46 +0000)
--with-python added to configure

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@563 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

configure
configure.in
curses.m4
plugins.m4

index ba819269298b1230e4d8af94d455416d4ed9772d..b24f2174c923be796f7928de82e86bf3ac1f871e 100755 (executable)
--- a/configure
+++ b/configure
@@ -858,9 +858,10 @@ Optional Packages:
   --with-sco              Use this to turn on SCO-specific code
   --with-sunos-curses     Used to force SunOS 4.x curses
   --with-osf1-curses      Used to force OSF/1 curses
-  --with-vcurses=incdir Used to force SysV curses
-  --with-ncurses=dir  Compile with ncurses/locate base dir
+  --with-vcurses=incdir   Used to force SysV curses
+  --with-ncurses=dir      Compile with ncurses/locate base dir
   --with-x                use the X Window System
+  --with-python           enable python support [default=no]
   --with-drivers=<list>   compile driver for displays in <list>,
                           drivers may be separated with commas,
                           'all' (default) compiles all available drivers,
@@ -3479,7 +3480,7 @@ echo "${ECHO_T}Please note that some screen refreshs may fail" >&6
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
        ncurses_version=unknown
 cat > conftest.$ac_ext <<EOF
-#line 3482 "configure"
+#line 3483 "configure"
 #include "confdefs.h"
 #ifdef RENAMED_NCURSES
 #include <curses.h>
@@ -5605,7 +5606,20 @@ done
 
 
 # check for python
-## ------------------------
+echo "$as_me:$LINENO: checking if python support is wanted" >&5
+echo $ECHO_N "checking if python support is wanted... $ECHO_C" >&6
+
+# Check whether --with-python or --without-python was given.
+if test "${with_python+set}" = set; then
+  withval="$with_python"
+  echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+if test "$with_python" = "yes"; then
+  ## ------------------------
 ## Python file handling
 ## From Andrew Dalke
 ## Updated by James Henstridge
@@ -5852,6 +5866,7 @@ echo $ECHO_N "checking python extra libraries... $ECHO_C" >&6
 echo "${ECHO_T}$PYTHON_EXTRA_LIBS" >&6`
 
 
+fi
 
 # drivers
 
@@ -6366,7 +6381,7 @@ echo "$as_me: error: run ./configure --with-plugins=..." >&2;}
          PLUGIN_POP3="yes"
          PLUGIN_PPP="yes"
          PLUGIN_PROC_STAT="yes"
-         PLUGIN_PYTHON="yes"
+         PLUGIN_PYTHON=$with_python
          PLUGIN_SETI="yes"
          PLUGIN_STATFS="yes"
          PLUGIN_UNAME="yes"
@@ -7269,18 +7284,23 @@ _ACEOF
 
 fi
 if test "$PLUGIN_PYTHON" = "yes"; then
-   if test -z "$python_path"; then
-      { echo "$as_me:$LINENO: WARNING: python headers not found: python plugin disabled" >&5
-echo "$as_me: WARNING: python headers not found: python plugin disabled" >&2;}
+   if test "$with_python" != "yes"; then
+      { echo "$as_me:$LINENO: WARNING: python support not enabled: python plugin disabled (use --with-python to enable)" >&5
+echo "$as_me: WARNING: python support not enabled: python plugin disabled (use --with-python to enable)" >&2;}
    else
-      PLUGINS="$PLUGINS plugin_python.o"
-      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
-      PLUGINLIBS="$PLUGINLIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
+      if test -z "$python_path"; then
+         { echo "$as_me:$LINENO: WARNING: python headers not found: python plugin disabled" >&5
+echo "$as_me: WARNING: python headers not found: python plugin disabled" >&2;}
+      else
+         PLUGINS="$PLUGINS plugin_python.o"
+         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+         PLUGINLIBS="$PLUGINLIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
 
 cat >>confdefs.h <<\_ACEOF
 #define PLUGIN_PYTHON 1
 _ACEOF
 
+      fi
    fi
 fi
 if test "$PLUGIN_SETI" = "yes"; then
index bffb449e9ce41a176cf2fa577a04af04b9de5291..f3509d9bdfabcabf9a21b4b4bc359a794de16d22 100644 (file)
@@ -58,8 +58,14 @@ AC_CHECK_HEADERS(usb.h, [has_usb="true"], [has_usb="false"])
 AC_CHECK_HEADERS(serdisplib/serdisp.h, [has_serdisplib="true"], [has_serdisplib="false"])
 
 # check for python
-sinclude(python.m4)
-AC_PYTHON_DEVEL
+AC_MSG_CHECKING(if python support is wanted)
+AC_ARG_WITH(python,
+[  --with-python           enable python support [[default=no]]],
+[AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
+if test "$with_python" = "yes"; then
+  sinclude(python.m4)
+  AC_PYTHON_DEVEL
+fi
 
 # drivers
 sinclude(drivers.m4)
index e5c22348916e931632d5aa1e2c5e4e50fff9b7fc..5339c39b208c9a547ab515312ad37eda69c9a183 100644 (file)
--- a/curses.m4
+++ b/curses.m4
@@ -119,7 +119,7 @@ AC_DEFUN([AC_CHECK_CURSES],[
        ])
 
        AC_ARG_WITH(vcurses,
-         [  --with-vcurses[=incdir] Used to force SysV curses],
+         [  --with-vcurses[=incdir]   Used to force SysV curses],
          if test x$withval != xyes; then
                CURSES_INCLUDEDIR="-I$withval"
          fi
@@ -127,7 +127,7 @@ AC_DEFUN([AC_CHECK_CURSES],[
        )
 
        AC_ARG_WITH(ncurses,
-         [  --with-ncurses[=dir]  Compile with ncurses/locate base dir],
+         [  --with-ncurses[=dir]      Compile with ncurses/locate base dir],
          if test x$withval = xno ; then
                search_ncurses=false
          elif test x$withval != xyes ; then
index ce1393b6061653b3afdda0d5033bc885a7673754..03959e20e73427f72d4af58fb8d6f4252a87b160 100644 (file)
@@ -64,7 +64,7 @@ for plugin in $plugins; do
          PLUGIN_POP3="yes"
          PLUGIN_PPP="yes"
          PLUGIN_PROC_STAT="yes"
-         PLUGIN_PYTHON="yes"
+         PLUGIN_PYTHON=$with_python
          PLUGIN_SETI="yes"
          PLUGIN_STATFS="yes"
          PLUGIN_UNAME="yes"
@@ -231,13 +231,17 @@ if test "$PLUGIN_PROC_STAT" = "yes"; then
    AC_DEFINE(PLUGIN_PROC_STAT,1,[proc_stat plugin])
 fi
 if test "$PLUGIN_PYTHON" = "yes"; then
-   if test -z "$python_path"; then
-      AC_MSG_WARN(python headers not found: python plugin disabled)
+   if test "$with_python" != "yes"; then
+      AC_MSG_WARN(python support not enabled: python plugin disabled (use --with-python to enable))
    else
-      PLUGINS="$PLUGINS plugin_python.o"
-      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
-      PLUGINLIBS="$PLUGINLIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
-      AC_DEFINE(PLUGIN_PYTHON,1,[python plugin])
+      if test -z "$python_path"; then
+         AC_MSG_WARN(python headers not found: python plugin disabled)
+      else
+         PLUGINS="$PLUGINS plugin_python.o"
+         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+         PLUGINLIBS="$PLUGINLIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
+         AC_DEFINE(PLUGIN_PYTHON,1,[python plugin])
+      fi 
    fi 
 fi
 if test "$PLUGIN_SETI" = "yes"; then