Skip to content

Commit

Permalink
- Fixed compilation of OMShell-terminal on OSX
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5683 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 16, 2010
1 parent c901c4c commit 8c2f776
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Compiler/Makefile.compiler_subdirs.common
Expand Up @@ -59,7 +59,7 @@ reallyclean: clean
.PRECIOUS: Makefile $(ALLMO)

Makefile: Makefile.in
$(top_builddir)/config.status Makefile
cd $(top_builddir); ./config.status

## dependencies
include $(srcdir)/.depend
97 changes: 67 additions & 30 deletions configure
Expand Up @@ -3656,43 +3656,80 @@ else
$as_echo "no" >&6; }
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline include" >&5
$as_echo_n "checking for readline include... " >&6; }
if test -d /home/pelab/pkg/gnu/include ; then
readlineinc="/home/pelab/pkg/gnu/include"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
if test "x$ac_cv_header_readline_readline_h" = x""yes; then :

else
readlineinc=`find /usr/include /usr/local/include -name readline.h | tail -1 | awk -F/ '{ total="";for (i = 1 ; i < NF; i++) total= total $i "/"; print total}'`
if test -z "$readlineinc" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find readline header files" >&5
$as_echo "$as_me: WARNING: Could not find readline header files" >&2;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
as_fn_error "readline missing" "$LINENO" 5
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline libs" >&5
$as_echo_n "checking for readline libs... " >&6; }
if test -d /home/pelab/pkg/gnu/lib ; then
readlinelib="/home/pelab/pkg/gnu/lib"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
if test "x$ac_cv_header_readline_history_h" = x""yes; then :

else
readlinelib=`find /usr/lib /usr/local/lib -name libreadline.a | tail -1 | awk -F/ '{ total="";for (i = 1 ; i < NF; i++) total= total $i "/"; print total}'`
if test -z "$readlinelib" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find readline lib file" >&5
$as_echo "$as_me: WARNING: Could not find readline lib file" >&2;}
as_fn_error "readline missing" "$LINENO" 5
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
$as_echo_n "checking for library containing readline... " >&6; }
if test "${ac_cv_search_readline+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char readline ();
int
main ()
{
return readline ();
;
return 0;
}
_ACEOF
for ac_lib in '' readline; do
if test -z "$ac_lib"; then
ac_res="none required"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_readline=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_readline+set}" = set; then :
break
fi
done
if test "${ac_cv_search_readline+set}" = set; then :

else
ac_cv_search_readline=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_readline" >&5
$as_echo "$ac_cv_search_readline" >&6; }
ac_res=$ac_cv_search_readline
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
as_fn_error "readline missing" "$LINENO" 5
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Expand Down
36 changes: 3 additions & 33 deletions configure.in
Expand Up @@ -9,8 +9,6 @@ AC_SUBST(rmlinc)
AC_SUBST(omc_antlr_jar)
AC_SUBST(antlrinc)
AC_SUBST(antlrlib)
AC_SUBST(readlineinc)
AC_SUBST(readlinelib)
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBNSL)
AC_SUBST(LIBLPSOLVE55)
Expand Down Expand Up @@ -109,37 +107,9 @@ else
AC_MSG_RESULT([no])
fi

AC_MSG_CHECKING([for readline include])
dnl First check in special place for pelab
if test -d /home/pelab/pkg/gnu/include ; then
readlineinc="/home/pelab/pkg/gnu/include"
AC_MSG_RESULT([yes])
else
dnl Check in standard paths
readlineinc=`find /usr/include /usr/local/include -name readline.h | tail -1 | awk -F/ '{ total="";for (i = 1 ; i < NF; i++) total= total $i "/"; print total}'`
if test -z "$readlineinc" ; then
AC_MSG_RESULT([no])
AC_MSG_WARN([Could not find readline header files])
else
AC_MSG_RESULT([yes])
fi
fi

AC_MSG_CHECKING([for readline libs])
dnl First check in special place for pelab
if test -d /home/pelab/pkg/gnu/lib ; then
readlinelib="/home/pelab/pkg/gnu/lib"
AC_MSG_RESULT([yes])
else
dnl Check in standard paths
readlinelib=`find /usr/lib /usr/local/lib -name libreadline.a | tail -1 | awk -F/ '{ total="";for (i = 1 ; i < NF; i++) total= total $i "/"; print total}'`
if test -z "$readlinelib" ; then
AC_MSG_RESULT([no])
AC_MSG_WARN([Could not find readline lib file])
else
AC_MSG_RESULT([yes])
fi
fi
AC_CHECK_HEADER(readline/readline.h,,AC_MSG_ERROR([readline missing]))
AC_CHECK_HEADER(readline/history.h,,AC_MSG_ERROR([readline missing]))
AC_SEARCH_LIBS(readline,readline,,[AC_MSG_ERROR([readline missing])])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Expand Down

0 comments on commit 8c2f776

Please sign in to comment.