remove old workaround for older popt version.

Original commit message from CVS:
remove old workaround for older popt version.
This commit is contained in:
Benjamin Otte 2003-04-04 17:37:19 +00:00
parent 95b078ac08
commit afe37388cb
2 changed files with 8 additions and 20 deletions

View file

@ -165,10 +165,12 @@ dnl check for libxml2
GST_LIBXML2_CHECK()
dnl popt checks
dnl FIXME: This test passes on popt 1.6.2, maybe earlier, but popt 1.6.2
dnl causes segfaults on gst_init. Write a working test if possible.
GST_CHECK_LIBHEADER(POPT, popt, poptStrippedArgv,, popt.h, POPT_LIBS="-lpopt",
AC_MSG_ERROR([popt 1.6.1 or newer is required to build gstreamer. You can
AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
download the latest version from
ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])
ftp://ftp.rpm.org/pub/rpm/dist/])
)
AC_MSG_NOTICE(Checking for POPT_TABLEEND)
AC_COMPILE_IFELSE([
@ -183,9 +185,9 @@ int main ()
}
],, [
dnl it failed
AC_MSG_ERROR([popt 1.6.1 or newer is required to build gstreamer. You can
AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
download the latest version from
ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])
ftp://ftp.rpm.org/pub/rpm/dist/])
])
dnl Check for atomic.h

View file

@ -215,8 +215,7 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
const struct poptOption *popt_options)
{
poptContext context;
gint nextopt, i, j, nstrip;
gchar **temp;
gint nextopt;
const struct poptOption *options;
const struct poptOption options_with[] = {
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL},
@ -272,21 +271,8 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
}
poptFreeContext (context);
/* let's do this once there are 1.6.3 popt debs out
*argc = poptStrippedArgv (context, *argc, *argv); */
*argc = poptStrippedArgv (context, *argc, *argv);
/* until then we'll do a very basic arg permutation */
temp = *argv + 1;
i = 1;
nstrip = 0;
g_assert (*argc > 0);
while (i++ < *argc && *temp[0]=='-') {
for (j = 1; j < *argc - 1; j++)
(*argv)[j] = (*argv)[j+1];
(*argv)[*argc-1] = *temp;
nstrip++;
}
*argc -= nstrip;
return TRUE;
}