Changeset 4379

Show
Ignore:
Timestamp:
09/20/06 22:54:14 (2 years ago)
Author:
morris
Message:

Detect when using non-GNU readline (such as the default editline wrapper on OSX)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/configure

    r4373 r4379  
    58495849 
    58505850                LIBS="$LIBS -lreadline" 
     5851 
     5852                echo "$as_me:$LINENO: checking for GNU readline" >&5 
     5853echo $ECHO_N "checking for GNU readline... $ECHO_C" >&6 
     5854                if test "$cross_compiling" = yes; then 
     5855  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 
     5856See \`config.log' for more details." >&5 
     5857echo "$as_me: error: cannot run test program while cross compiling 
     5858See \`config.log' for more details." >&2;} 
     5859   { (exit 1); exit 1; }; } 
     5860else 
     5861  cat >conftest.$ac_ext <<_ACEOF 
     5862 
     5863                        #include <stdio.h> 
     5864                        #include <readline/readline.h> 
     5865                        int main(void) { 
     5866                                return rl_gnu_readline_p ? 0 : 1; 
     5867                        } 
     5868 
     5869_ACEOF 
     5870rm -f conftest$ac_exeext 
     5871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     5872  (eval $ac_link) 2>&5 
     5873  ac_status=$? 
     5874  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5875  (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 
     5876  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5877  (eval $ac_try) 2>&5 
     5878  ac_status=$? 
     5879  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5880  (exit $ac_status); }; }; then 
     5881 
     5882                        echo "$as_me:$LINENO: result: yes" >&5 
     5883echo "${ECHO_T}yes" >&6 
     5884 
     5885else 
     5886  echo "$as_me: program exited with status $ac_status" >&5 
     5887echo "$as_me: failed program was:" >&5 
     5888sed 's/^/| /' conftest.$ac_ext >&5 
     5889 
     5890( exit $ac_status ) 
     5891 
     5892                        echo "$as_me:$LINENO: result: no" >&5 
     5893echo "${ECHO_T}no" >&6 
     5894 
     5895        { { echo "$as_me:$LINENO: error: could not locate GNU readline 
     5896 
     5897If you installed GNU readline into a non-standard directory, please run: 
     5898 
     5899    CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     5900echo "$as_me: error: could not locate GNU readline 
     5901 
     5902If you installed GNU readline into a non-standard directory, please run: 
     5903 
     5904    CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     5905   { (exit 1); exit 1; }; } 
     5906 
     5907 
     5908fi 
     5909rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 
     5910fi 
    58515911 
    58525912                echo "$as_me:$LINENO: checking for rl_completion_matches" >&5 
  • wire/trunk/configure.in

    r4373 r4379  
    263263                LIBS="$LIBS -lreadline" 
    264264 
     265                AC_MSG_CHECKING([for GNU readline]) 
     266                AC_RUN_IFELSE([ 
     267                        #include <stdio.h> 
     268                        #include <readline/readline.h> 
     269                        int main(void) { 
     270                                return rl_gnu_readline_p ? 0 : 1; 
     271                        } 
     272                ], [ 
     273                        AC_MSG_RESULT([yes]) 
     274                ], [ 
     275                        AC_MSG_RESULT([no]) 
     276                        WR_MSG_LIB_ERROR([GNU readline]) 
     277                ]) 
     278 
    265279                AC_MSG_CHECKING([for rl_completion_matches]) 
    266280                AC_RUN_IFELSE([